Namespace NOpenNLP.Tools.Util.Eval

Classes

CrossValidationPartitioner<E>

Provides access to training and test partitions for n-fold cross validation.

Cross validation is used to evaluate the performance of a classifier when only training data is available. The training set is split into n parts and the training / evaluation is performed n times on these parts. The training partition always consists of n -1 parts and one part is used for testing.

To use the CrossValidationPartitioner<E> a client iterates over the n CrossValidationPartitioner<E>.TrainingSampleStreams. Each CrossValidationPartitioner<E>.TrainingSampleStream represents one partition and is used first for training and afterwards for testing. The TestSampleStream can be obtained from the CrossValidationPartitioner<E>.TrainingSampleStream with the GetTestSampleStream() method.

CrossValidationPartitioner<E>.TrainingSampleStream

The CrossValidationPartitioner<E>.TrainingSampleStream which iterates over all training elements.

Note: After the test sample stream was obtained the CrossValidationPartitioner<E>.TrainingSampleStream must not be used anymore, otherwise an InvalidOperationException is thrown.

The IObjectStream<T>s must not be used anymore after the CrossValidationPartitioner<E> was moved to one of next partitions. If they are called anyway an InvalidOperationException is thrown.

Evaluator<T>

The Evaluator<T> is an abstract base class for evaluators.

Evaluation results are the arithmetic mean of the scores calculated for each reference sample.

FMeasure

The FMeasure is an utility class for evaluators which measure precision, recall and the resulting f-measure.

Evaluation results are the arithmetic mean of the precision scores calculated for each reference sample and the arithmetic mean of the recall scores calculated for each reference sample.

Mean

Calculates the arithmetic mean of values added with the Add(double) method.

Interfaces

IEvaluationMonitor<T>