mulan.classifier
Interface MultiLabelLearner

All Known Implementing Classes:
AdaBoostMH, BinaryRelevance, BPMLL, BRkNN, CalibratedLabelRanking, ClassifierChain, ClusteringBased, EnsembleOfClassifierChains, EnsembleOfPrunedSets, EnsembleOfSubsetLearners, ExampleBasedFMeasureOptimizer, HMC, HMCNode, HOMER, IBLR_ML, IncludeLabelsClassifier, LabelPowerset, LabelsetPruning, Meta, MetaLabeler, MLkNN, MLPTO, MMPLearner, MultiClassLearner, MultiLabelKNN, MultiLabelLearnerBase, MultiLabelMetaLearner, MultiLabelStacking, OneThreshold, PPT, PrunedSets, RAkEL, RAkELd, RCut, SCut, SubsetLearner, ThresholdPrediction, TransformationBasedMultiLabelLearner

public interface MultiLabelLearner

Common root interface for all multi-label learner types.

Author:
Jozef Vilcek

Method Summary
 void build(MultiLabelInstances instances)
          Builds the learner model from specified MultiLabelInstances data.
 boolean isUpdatable()
          Returns value indicating if learner is updatable, so if learner is able to perform on-line learning.
 MultiLabelLearner makeCopy()
          Creates a deep copy of the given learner using serialization.
 MultiLabelOutput makePrediction(Instance instance)
          Returns the prediction of the learner for a given input Instance.
 void setDebug(boolean debug)
          Sets whether debugging information should be output by the model
 

Method Detail

isUpdatable

boolean isUpdatable()
Returns value indicating if learner is updatable, so if learner is able to perform on-line learning. The fact if learner is updatable or not influences the behavior of build(MultiLabelInstances) method.

When false is returned, each call of the build(MultiLabelInstances) will initialize the learner from the scratch, removing any potential knowledge built by previously entered training data. When true is returned, then on the first call of the build(MultiLabelInstances) the learner is initialized with the passed training data. All other calls contribute to the existing learner's model with new data.

Returns:
true if learner is updatable (on-line), false otherwise.

build

void build(MultiLabelInstances instances)
           throws Exception,
                  InvalidDataException
Builds the learner model from specified MultiLabelInstances data. Sequential calls to this method either re-build the learners model with new data (off-line learner) or contribute to the existing model with new data (on-line learner). The behavior is determined by the outcome of isUpdatable() method.

Parameters:
instances - set of training data, upon which the learner model should be built
Throws:
Exception - if learner model was not created successfully
InvalidDataException - if specified instances data is invalid or not supported by the learner
See Also:
isUpdatable()

makeCopy

MultiLabelLearner makeCopy()
                           throws Exception
Creates a deep copy of the given learner using serialization.

Returns:
a deep copy of the learner
Throws:
Exception - if an error occurs while making copy of the learner.

makePrediction

MultiLabelOutput makePrediction(Instance instance)
                                throws Exception,
                                       InvalidDataException,
                                       ModelInitializationException
Returns the prediction of the learner for a given input Instance.

Parameters:
instance - the input given to the learner in the form of Instance
Returns:
a prediction of the learner in form of MultiLabelOutput.
Throws:
Exception - if an error occurs while making the prediction.
InvalidDataException - if specified instance data is invalid and can not be processed by the learner
ModelInitializationException - if method is called before build(MultiLabelInstances)

setDebug

void setDebug(boolean debug)
Sets whether debugging information should be output by the model

Parameters:
debug -