mulan.classifier.meta.thresholding
Class ThresholdPrediction

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.ThresholdPrediction
All Implemented Interfaces:
Serializable, MultiLabelLearner, TechnicalInformationHandler

public class ThresholdPrediction
extends Meta

Class that learns to predict a different threshold per exampleFor more information, see

Elisseeff, Andre, Weston, Jason: A kernel method for multi-labelled classification. In: Proceedings of NIPS 14, 2002.

BibTeX:

 @inproceedings{Elisseeff2002,
    author = {Elisseeff, Andre and Weston, Jason},
    booktitle = {Proceedings of NIPS 14},
    title = {A kernel method for multi-labelled classification},
    year = {2002}
 }
 

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
ThresholdPrediction()
          Default constructor
ThresholdPrediction(MultiLabelLearner baseLearner, Classifier classifier, String metaDataChoice, int folds)
          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.
 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

ThresholdPrediction

public ThresholdPrediction()
Default constructor


ThresholdPrediction

public ThresholdPrediction(MultiLabelLearner baseLearner,
                           Classifier classifier,
                           String metaDataChoice,
                           int folds)
Constructor that initializes the learner

Parameters:
baseLearner - the underlying multi-label learner
classifier - the binary classification
metaDataChoice - the type of meta-data
folds - the number of internal cv folds
Method Detail

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

public 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

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

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