de.lmu.ifi.dbs.elki.datasource.filter
Class ClassLabelFilter

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.datasource.filter.ClassLabelFilter
All Implemented Interfaces:
ObjectFilter

public class ClassLabelFilter
extends Object
implements ObjectFilter

Class that turns a label column into a class label column.


Nested Class Summary
static class ClassLabelFilter.Parameterizer
          Parameterization class.
 
Field Summary
static OptionID CLASS_LABEL_CLASS_ID
          Parameter to specify the class of occurring class labels.
static OptionID CLASS_LABEL_INDEX_ID
          Optional parameter that specifies the index of the label to be used as class label, must be an integer equal to or greater than 0.
private  ClassLabel.Factory<?> classLabelFactory
          The class label class to use.
private  int classLabelIndex
          The index of the label to be used as class label, null if no class label is specified.
 
Constructor Summary
ClassLabelFilter(int classLabelIndex, ClassLabel.Factory<?> classLabelFactory)
          Constructor.
 
Method Summary
 MultipleObjectsBundle filter(MultipleObjectsBundle objects)
          Filter a set of object packages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_LABEL_INDEX_ID

public static final OptionID CLASS_LABEL_INDEX_ID
Optional parameter that specifies the index of the label to be used as class label, must be an integer equal to or greater than 0.

Key: -dbc.classLabelIndex


CLASS_LABEL_CLASS_ID

public static final OptionID CLASS_LABEL_CLASS_ID
Parameter to specify the class of occurring class labels.

Key: -dbc.classLabelClass


classLabelIndex

private final int classLabelIndex
The index of the label to be used as class label, null if no class label is specified.


classLabelFactory

private final ClassLabel.Factory<?> classLabelFactory
The class label class to use.

Constructor Detail

ClassLabelFilter

public ClassLabelFilter(int classLabelIndex,
                        ClassLabel.Factory<?> classLabelFactory)
Constructor.

Parameters:
classLabelIndex - The index to convert
classLabelFactory - The class label factory to use
Method Detail

filter

public MultipleObjectsBundle filter(MultipleObjectsBundle objects)
Description copied from interface: ObjectFilter
Filter a set of object packages.

Specified by:
filter in interface ObjectFilter
Parameters:
objects - Object to filter
Returns:
Filtered objects

Release 0.4.0 (2011-09-20_1324)