rdr.mulan
Interface MultiLabelClassifier

All Known Implementing Classes:
BinaryRelevanceClassifier, FlattenTrueLabelsClassifier, IncludeLabelsClassifier, MultiLabelClassifierBase, TransformationBasedMultiLabelClassifier

public interface MultiLabelClassifier

Common interface for multi-label classifiers.

Author:
Eleftherios Spyromitros-Xioufis ( espyromi@csd.auth.gr ), Jozef Vilcek

Method Summary
 void buildClassifier(weka.core.Instances instances)
          Builds the classifier.
 int getNumLabels()
          Returns a number of labels the classifier is configured for.
 Prediction predict(weka.core.Instance instance)
          Computes the prediction of labels for a specified input Instance.
 

Method Detail

getNumLabels

int getNumLabels()
Returns a number of labels the classifier is configured for. The label attributes are assumed to be the last ones in Instances training data.

Returns:
the number of labels

predict

Prediction predict(weka.core.Instance instance)
                   throws java.lang.Exception
Computes the prediction of labels for a specified input Instance.

Parameters:
instance - the input instance for which the prediction is made
Returns:
the prediction
Throws:
java.lang.Exception - if prediction was not successful

buildClassifier

void buildClassifier(weka.core.Instances instances)
                     throws java.lang.Exception
Builds the classifier.

Parameters:
instances - set of training data, upon which the classifier should be build
Throws:
java.lang.Exception - if classifier was not created successfully