Class LanguageDetectorCrossValidator

Namespace
NOpenNLP.Tools.Langdetect
Assembly
NOpenNLP.Tools.dll

Cross validator for the language detector.

public class LanguageDetectorCrossValidator
Inheritance
LanguageDetectorCrossValidator
Inherited Members

Constructors

LanguageDetectorCrossValidator(TrainingParameters, LanguageDetectorFactory, params ILanguageDetectorEvaluationMonitor?[]?)

public LanguageDetectorCrossValidator(TrainingParameters mlParams, LanguageDetectorFactory factory, params ILanguageDetectorEvaluationMonitor?[]? listeners)

Parameters

mlParams TrainingParameters
factory LanguageDetectorFactory
listeners ILanguageDetectorEvaluationMonitor[]

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<LanguageSample?>, int)

Starts the evaluation.

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

Parameters

samples IObjectStream<LanguageSample>

the data to train and test

nFolds int

number of folds

Exceptions

IOException

if there is an error during reading