Class CrossValidationPartitioner<E>


  • public class CrossValidationPartitioner<E>
    extends Object
    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 a client iterates over the n stream. Each CrossValidationPartitioner.TrainingSampleStream represents one partition and is used first for training and afterwards for testing. The CrossValidationPartitioner.TestSampleStream can be obtained via the CrossValidationPartitioner.TrainingSampleStream.getTestSampleStream() method.