mulan.classifier.meta.thresholding
Class MetaLabeler

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

public class MetaLabeler
extends Meta

Class implementing the MetaLabeler algorithm. For more information, see

Lei Tang, Sugu Rajan, Yijay K. Narayanan: Large scale multi-label classification via metalabeler. In: Proceedings of the 18th international conference on World wide web , 211-220, 2009.

BibTeX:

 @inproceedings{Tang2009,
    author = {Lei Tang and Sugu Rajan and Yijay K. Narayanan},
    booktitle = {Proceedings of the 18th international conference on World wide web },
    pages = {211-220},
    title = {Large scale multi-label classification via metalabeler},
    year = {2009},
    location = {Madrid, Spain}
 }
 

Version:
2010.12.14
Author:
Marios Ioannou, George Sakkas, Grigorios Tsoumakas
See Also:
Serialized Form

Field Summary
 
Fields inherited from class mulan.classifier.meta.thresholding.Meta
classifier, classifierInstances, foldLearner, kFoldsCV, metaDatasetChoice
 
Fields inherited from class mulan.classifier.meta.MultiLabelMetaLearner
baseLearner
 
Fields inherited from class mulan.classifier.MultiLabelLearnerBase
featureIndices, labelIndices, numLabels
 
Constructor Summary
MetaLabeler()
          Default constructor
MetaLabeler(MultiLabelLearner baseLearner, Classifier classifier, String metaDataChoice, String aClassChoice)
          Constructor that initializes the learner
 
Method Summary
 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 the multi-label learner.
protected  MultiLabelOutput makePredictionInternal(Instance instance)
          Learner specific implementation for predicting on specified data based on trained model.
 void setFolds(int f)
          Sets the number of folds for internal cv
protected  Instances transformData(MultiLabelInstances trainingData)
          abstract method that transforms the training data to meta data
 
Methods inherited from class mulan.classifier.meta.thresholding.Meta
buildInternal, getClassifier, modifiedInstanceX, prepareClassifierInstances, valuesX
 
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

MetaLabeler

public MetaLabeler()
Default constructor


MetaLabeler

public MetaLabeler(MultiLabelLearner baseLearner,
                   Classifier classifier,
                   String metaDataChoice,
                   String aClassChoice)
Constructor that initializes the learner

Parameters:
baseLearner - the underlying multi-label learner
classifier - the binary classification
metaDataChoice - the type of meta-data
aClassChoice - the type of the class
Method Detail

getTechnicalInformation

public TechnicalInformation getTechnicalInformation()
Description copied from class: MultiLabelLearnerBase
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

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

transformData

protected Instances transformData(MultiLabelInstances trainingData)
                           throws Exception
Description copied from class: Meta
abstract method that transforms the training data to meta data

Specified by:
transformData in class Meta
Parameters:
trainingData - the training data set
Returns:
the meta data for training the predictor of labels/threshold
Throws:
Exception

setFolds

public void setFolds(int f)
Sets the number of folds for internal cv

Parameters:
f - the number of folds

globalInfo

public String globalInfo()
Description copied from class: MultiLabelLearnerBase
Returns a string describing the multi-label learner.

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