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

parameters TrainingParameters

Fields

NAIVE_BAYES_VALUE

public const string NAIVE_BAYES_VALUE = "NAIVEBAYES"

Field Value

string

Properties

IsSortAndMerge

Whether the data indexer should sort and merge the indexed events.

public override bool IsSortAndMerge { get; }

Property Value

bool

Methods

DoTrain(IDataIndexer)

Trains a model from the given, already indexed, training data.

public override IMaxentModel DoTrain(IDataIndexer indexer)

Parameters

indexer IDataIndexer

Returns

IMaxentModel

TrainModel(IDataIndexer)

public virtual AbstractModel TrainModel(IDataIndexer di)

Parameters

di IDataIndexer

Returns

AbstractModel