Class NaiveBayesTrainer
- Namespace
- NOpenNLP.Tools.Ml.Naivebayes
- Assembly
- NOpenNLP.Tools.dll
Trains models using the combination of EM algorithm and Naive Bayes classifier which is described in: Text Classification from Labeled and Unlabeled Documents using EM Nigam, McCallum, et al paper of 2000
public class NaiveBayesTrainer : AbstractEventTrainer, IEventTrainer
- Inheritance
-
NaiveBayesTrainer
- Implements
- Inherited Members
Constructors
NaiveBayesTrainer()
public NaiveBayesTrainer()
NaiveBayesTrainer(TrainingParameters)
public NaiveBayesTrainer(TrainingParameters parameters)
Parameters
parametersTrainingParameters
Fields
NAIVE_BAYES_VALUE
public const string NAIVE_BAYES_VALUE = "NAIVEBAYES"
Field Value
Properties
IsSortAndMerge
Whether the data indexer should sort and merge the indexed events.
public override bool IsSortAndMerge { get; }
Property Value
Methods
DoTrain(IDataIndexer)
Trains a model from the given, already indexed, training data.
public override IMaxentModel DoTrain(IDataIndexer indexer)
Parameters
indexerIDataIndexer
Returns
TrainModel(IDataIndexer)
public virtual AbstractModel TrainModel(IDataIndexer di)
Parameters
diIDataIndexer