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?[]?)
Creates a LanguageDetectorCrossValidator.
public LanguageDetectorCrossValidator(TrainingParameters mlParams, LanguageDetectorFactory factory, params ILanguageDetectorEvaluationMonitor?[]? listeners)
Parameters
mlParamsTrainingParametersfactoryLanguageDetectorFactorylistenersILanguageDetectorEvaluationMonitor[]
Properties
DocumentAccuracy
Retrieves the accuracy for all iterations.
public virtual double DocumentAccuracy { get; }
Property Value
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
Methods
Evaluate(IObjectStream<LanguageSample?>, int)
Starts the evaluation.
public virtual void Evaluate(IObjectStream<LanguageSample?> samples, int nFolds)
Parameters
samplesIObjectStream<LanguageSample>the data to train and test
nFoldsintnumber of folds
Exceptions
- IOException
if there is an error during reading