Class DoccatCrossValidator

Namespace
NOpenNLP.Tools.Doccat
Assembly
NOpenNLP.Tools.dll

Cross validator for document categorization.

public class DoccatCrossValidator
Inheritance
DoccatCrossValidator
Inherited Members

Constructors

DoccatCrossValidator(string, TrainingParameters, DoccatFactory, params IDoccatEvaluationMonitor?[]?)

Creates a DoccatCrossValidator with the given IFeatureGenerators.

public DoccatCrossValidator(string languageCode, TrainingParameters mlParams, DoccatFactory factory, params IDoccatEvaluationMonitor?[]? listeners)

Parameters

languageCode string
mlParams TrainingParameters
factory DoccatFactory
listeners IDoccatEvaluationMonitor[]

Properties

DocumentAccuracy

Retrieves the accuracy for all iterations.

public virtual double DocumentAccuracy { get; }

Property Value

double

DocumentCount

Retrieves the number of words which where validated over all iterations. The result is the amount of folds multiplied by the total number of words.

public virtual long DocumentCount { get; }

Property Value

long

Methods

Evaluate(IObjectStream<DocumentSample?>, int)

Starts the evaluation.

public virtual void Evaluate(IObjectStream<DocumentSample?> samples, int nFolds)

Parameters

samples IObjectStream<DocumentSample>

the data to train and test

nFolds int

number of folds

Exceptions

IOException

if there is an error during reading