Class NaiveBayesModelWriter
- Namespace
- NOpenNLP.Tools.Ml.Naivebayes
- Assembly
- NOpenNLP.Tools.dll
Abstract parent class for NaiveBayes writers. It provides the persist method which takes care of the structure of a stored document, and requires an extending class to define precisely how the data should be stored.
public abstract class NaiveBayesModelWriter : AbstractModelWriter, IDisposable
- Inheritance
-
NaiveBayesModelWriter
- Implements
- Derived
- Inherited Members
Constructors
NaiveBayesModelWriter(AbstractModel)
protected NaiveBayesModelWriter(AbstractModel model)
Parameters
modelAbstractModel
Fields
OUTCOME_LABELS
protected string[] OUTCOME_LABELS
Field Value
- string[]
PARAMS
protected Context[] PARAMS
Field Value
- Context[]
PRED_LABELS
protected string[] PRED_LABELS
Field Value
- string[]
Methods
CompressOutcomes(ComparablePredicate[])
protected virtual IList<IList<ComparablePredicate>> CompressOutcomes(ComparablePredicate[] sorted)
Parameters
sortedComparablePredicate[]
Returns
ComputeOutcomePatterns(ComparablePredicate[])
protected virtual IList<IList<ComparablePredicate>> ComputeOutcomePatterns(ComparablePredicate[] sorted)
Parameters
sortedComparablePredicate[]
Returns
Persist()
Writes the model to disk, using the WriteX() methods
provided by extending classes.
If you wish to create a NaiveBayesModelWriter which uses a different
structure, it will be necessary to override the persist method in
addition to implementing the WriteX() methods.
public override void Persist()
SortValues()
protected virtual ComparablePredicate[] SortValues()