Class AbstractHoldout
- java.lang.Object
-
- elki.evaluation.classification.holdout.AbstractHoldout
-
- All Implemented Interfaces:
Holdout
- Direct Known Subclasses:
LeaveOneOut,RandomizedHoldout,StratifiedCrossValidation
public abstract class AbstractHoldout extends java.lang.Object implements Holdout
Split a data set for holdout evaluation.- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected MultipleObjectsBundlebundleInput data bundle.protected intlabelcolColumn containing the class labels.protected java.util.ArrayList<ClassLabel>labelsLabels in the current data set.
-
Constructor Summary
Constructors Constructor Description AbstractHoldout()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.ArrayList<ClassLabel>allClassLabels(MultipleObjectsBundle bundle)Get an array of all class labels in a given data set.static java.util.ArrayList<ClassLabel>allClassLabels(MultipleObjectsBundle bundle, int col)Get an array of all class labels in a given data set.static intfindClassLabelColumn(MultipleObjectsBundle bundle)Find the class label column in the given data set.java.util.ArrayList<ClassLabel>getLabels()Get the sorted class labels present in this data set.voidinitialize(MultipleObjectsBundle bundle)Initialize the holdout procedure for a data set.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.evaluation.classification.holdout.Holdout
nextPartitioning, numberOfPartitions
-
-
-
-
Field Detail
-
labels
protected java.util.ArrayList<ClassLabel> labels
Labels in the current data set.
-
labelcol
protected int labelcol
Column containing the class labels.
-
bundle
protected MultipleObjectsBundle bundle
Input data bundle.
-
-
Method Detail
-
initialize
public void initialize(MultipleObjectsBundle bundle)
Description copied from interface:HoldoutInitialize the holdout procedure for a data set.- Specified by:
initializein interfaceHoldout- Parameters:
bundle- Data set bundle
-
getLabels
public java.util.ArrayList<ClassLabel> getLabels()
Description copied from interface:HoldoutGet the sorted class labels present in this data set. For indexing into assignment arrays.
-
findClassLabelColumn
public static int findClassLabelColumn(MultipleObjectsBundle bundle)
Find the class label column in the given data set.- Parameters:
bundle- Bundle- Returns:
- Class label column
-
allClassLabels
public static java.util.ArrayList<ClassLabel> allClassLabels(MultipleObjectsBundle bundle)
Get an array of all class labels in a given data set.- Parameters:
bundle- Bundle- Returns:
- Class labels.
-
allClassLabels
public static java.util.ArrayList<ClassLabel> allClassLabels(MultipleObjectsBundle bundle, int col)
Get an array of all class labels in a given data set.- Parameters:
bundle- Bundlecol- Column- Returns:
- Class labels.
-
-