mulan.transformations.multiclass
Class MultiClassTransformationBase
java.lang.Object
mulan.transformations.multiclass.MultiClassTransformationBase
- All Implemented Interfaces:
- Serializable, MultiClassTransformation
- Direct Known Subclasses:
- Copy, Ignore, SelectBasedOnFrequency, SelectRandom
public abstract class MultiClassTransformationBase
- extends Object
- implements Serializable, MultiClassTransformation
The base class for multi-class transformation methods. It provides initial
implementation of the MultiClassTransformation
interface. All
implementations of transformation methods should reuse this base class.
- Version:
- 2012.02.02
- Author:
- Stavros Bakirtzoglou
- See Also:
- Serialized Form
Field Summary |
protected int[] |
labelIndices
the array with the label indices |
protected int |
numOfLabels
the number of labels |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
numOfLabels
protected int numOfLabels
- the number of labels
labelIndices
protected int[] labelIndices
- the array with the label indices
MultiClassTransformationBase
public MultiClassTransformationBase()
transformInstances
public Instances transformInstances(MultiLabelInstances mlData)
throws Exception
- Description copied from interface:
MultiClassTransformation
- Transforms a multi-label dataset to a multi-class single label dataset
- Specified by:
transformInstances
in interface MultiClassTransformation
- Parameters:
mlData
- a multi-label dataset
- Returns:
- a single-label multi-class dataset
- Throws:
Exception