Class DisjointCrossValidation
- java.lang.Object
-
- elki.evaluation.classification.holdout.AbstractHoldout
-
- elki.evaluation.classification.holdout.RandomizedHoldout
-
- elki.evaluation.classification.holdout.DisjointCrossValidation
-
- All Implemented Interfaces:
Holdout
public class DisjointCrossValidation extends RandomizedHoldout
DisjointCrossValidation provides a set of partitions of a database to perform cross-validation. The test sets are guaranteed to be disjoint.- Since:
- 0.7.0
- Author:
- Arthur Zimek
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDisjointCrossValidation.ParParameterization class
-
Field Summary
Fields Modifier and Type Field Description protected int[]assignmentPartition assignment and size.protected intfoldHolds the number of folds, current fold.protected intnfoldHolds the number of folds, current fold.protected int[]sizesPartition assignment and size.-
Fields inherited from class elki.evaluation.classification.holdout.RandomizedHoldout
random
-
Fields inherited from class elki.evaluation.classification.holdout.AbstractHoldout
bundle, labelcol, labels
-
-
Constructor Summary
Constructors Constructor Description DisjointCrossValidation(RandomFactory random, int nfold)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(MultipleObjectsBundle bundle)Initialize the holdout procedure for a data set.TrainingAndTestSetnextPartitioning()Get the next partitioning of the given holdout.intnumberOfPartitions()How many partitions to test.-
Methods inherited from class elki.evaluation.classification.holdout.AbstractHoldout
allClassLabels, allClassLabels, findClassLabelColumn, getLabels
-
-
-
-
Constructor Detail
-
DisjointCrossValidation
public DisjointCrossValidation(RandomFactory random, int nfold)
Constructor.- Parameters:
random- Random seedingnfold- Number of folds.
-
-
Method Detail
-
initialize
public void initialize(MultipleObjectsBundle bundle)
Description copied from interface:HoldoutInitialize the holdout procedure for a data set.- Specified by:
initializein interfaceHoldout- Overrides:
initializein classAbstractHoldout- Parameters:
bundle- Data set bundle
-
numberOfPartitions
public int numberOfPartitions()
Description copied from interface:HoldoutHow many partitions to test.- Returns:
- Number of partitions.
-
nextPartitioning
public TrainingAndTestSet nextPartitioning()
Description copied from interface:HoldoutGet the next partitioning of the given holdout.- Returns:
- Next partitioning of the data set
-
-