mulan.classifier.meta
Class RAkELd

java.lang.Object
  extended by mulan.classifier.MultiLabelLearnerBase
      extended by mulan.classifier.meta.MultiLabelMetaLearner
          extended by mulan.classifier.meta.RAkELd
All Implemented Interfaces:
Serializable, MultiLabelLearner, TechnicalInformationHandler

public class RAkELd
extends MultiLabelMetaLearner

Class implementing a generalized version of the RAkEL-d (RAndom k-labELsets) algorithm with disjoint labelsets. For more information, see

Grigorios Tsoumakas, Ioannis Katakis, Ioannis Vlahavas (2011). Random k-Labelsets for Multi-Label Classification. IEEE Transactions on Knowledge and Data Engineering. 23(7):1079-1089.

BibTeX:

 @article{Tsoumakas2011,
    author = {Grigorios Tsoumakas and Ioannis Katakis and Ioannis Vlahavas},
    journal = {IEEE Transactions on Knowledge and Data Engineering},
    number = {7},
    pages = {1079-1089},
    title = {Random k-Labelsets for Multi-Label Classification},
    volume = {23},
    year = {2011}
 }
 

Version:
2012.07.16
Author:
Ioannis Katakis, Grigorios Tsoumakas
See Also:
Serialized Form

Field Summary
 
Fields inherited from class mulan.classifier.meta.MultiLabelMetaLearner
baseLearner
 
Fields inherited from class mulan.classifier.MultiLabelLearnerBase
featureIndices, labelIndices, numLabels
 
Constructor Summary
RAkELd()
          Default constructor
RAkELd(MultiLabelLearner baseLearner)
          Construct a new instance based on the given multi-label learner
RAkELd(MultiLabelLearner baseLearner, int subset)
          Constructs a new instance based on the given multi-label learner and size of subset
 
Method Summary
protected  void buildInternal(MultiLabelInstances trainingData)
          Learner specific implementation of building the model from MultiLabelInstances training data set.
 int getSizeOfSubset()
          Returns the size of the subsets
 TechnicalInformation getTechnicalInformation()
          Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.
 String globalInfo()
          Returns a string describing classifier
protected  MultiLabelOutput makePredictionInternal(Instance instance)
          Learner specific implementation for predicting on specified data based on trained model.
 void setSeed(int x)
          Sets the seed for random number generation
 void setSizeOfSubset(int size)
          Sets the size of the subsets
 void updateClassifier(MultiLabelInstances mlTrainData, int model)
          Updates the current ensemble by training a specific classifier
 
Methods inherited from class mulan.classifier.meta.MultiLabelMetaLearner
getBaseLearner
 
Methods inherited from class mulan.classifier.MultiLabelLearnerBase
build, debug, getDebug, isModelInitialized, isUpdatable, makeCopy, makePrediction, setDebug
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RAkELd

public RAkELd()
Default constructor


RAkELd

public RAkELd(MultiLabelLearner baseLearner)
Construct a new instance based on the given multi-label learner

Parameters:
baseLearner - a multi-label learner

RAkELd

public RAkELd(MultiLabelLearner baseLearner,
              int subset)
Constructs a new instance based on the given multi-label learner and size of subset

Parameters:
baseLearner - the multi-label learner
subset - the size of the subset
Method Detail

getTechnicalInformation

public TechnicalInformation getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.

Specified by:
getTechnicalInformation in interface TechnicalInformationHandler
Specified by:
getTechnicalInformation in class MultiLabelLearnerBase
Returns:
the technical information about this class

setSeed

public void setSeed(int x)
Sets the seed for random number generation

Parameters:
x - the seed

setSizeOfSubset

public void setSizeOfSubset(int size)
Sets the size of the subsets

Parameters:
size - size of subsets

getSizeOfSubset

public int getSizeOfSubset()
Returns the size of the subsets

Returns:
the size of the subsets

buildInternal

protected void buildInternal(MultiLabelInstances trainingData)
                      throws Exception
Description copied from class: MultiLabelLearnerBase
Learner specific implementation of building the model from MultiLabelInstances training data set. This method is called from MultiLabelLearnerBase.build(MultiLabelInstances) method, where behavior common across all learners is applied.

Specified by:
buildInternal in class MultiLabelLearnerBase
Parameters:
trainingData - the training data set
Throws:
Exception - if learner model was not created successfully

updateClassifier

public void updateClassifier(MultiLabelInstances mlTrainData,
                             int model)
                      throws Exception
Updates the current ensemble by training a specific classifier

Parameters:
mlTrainData - the training data
model - the model to train
Throws:
Exception

makePredictionInternal

protected MultiLabelOutput makePredictionInternal(Instance instance)
                                           throws Exception
Description copied from class: MultiLabelLearnerBase
Learner specific implementation for predicting on specified data based on trained model. This method is called from MultiLabelLearnerBase.makePrediction(weka.core.Instance) which guards for model initialization and apply common handling/behavior.

Specified by:
makePredictionInternal in class MultiLabelLearnerBase
Parameters:
instance - the data instance to predict on
Returns:
the output of the learner for the given instance
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

globalInfo

public String globalInfo()
Returns a string describing classifier

Specified by:
globalInfo in class MultiLabelLearnerBase
Returns:
a description suitable for displaying