|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mulan.classifier.MultiLabelLearnerBase mulan.classifier.transformation.TransformationBasedMultiLabelLearner mulan.classifier.transformation.LabelPowerset
public class LabelPowerset
Class that implements a label powerset classifier
Field Summary | |
---|---|
protected boolean |
makePredictionsBasedOnConfidences
Whether the method introduced by the PPT algorithm will be used to actually get the 1/0 output bipartition based on the confidences (requires a threshold) |
protected Random |
Rand
Random number generator for randomly solving tied predictions |
protected double |
threshold
Threshold used for deciding the 1/0 output value of each label based on the corresponding confidences as calculated by the method introduced in the PPT algorithm |
protected LabelPowersetTransformation |
transformation
The object that performs the data transformation |
Fields inherited from class mulan.classifier.transformation.TransformationBasedMultiLabelLearner |
---|
baseClassifier |
Fields inherited from class mulan.classifier.MultiLabelLearnerBase |
---|
featureIndices, labelIndices, numLabels |
Constructor Summary | |
---|---|
LabelPowerset(Classifier classifier)
Conststructor that initializes the learner with a base classifier |
Method Summary | |
---|---|
protected void |
buildInternal(MultiLabelInstances mlData)
Learner specific implementation of building the model from MultiLabelInstances
training data set. |
protected MultiLabelOutput |
makePredictionInternal(Instance instance)
Learner specific implementation for predicting on specified data based on trained model. |
void |
setConfidenceCalculationMethod(int method)
Sets the method of calculating probabilities for each label |
void |
setMakePredictionsBasedOnConfidences(boolean value)
Sets a threshold for obtaining the bipartition |
void |
setSeed(int s)
Setting a seed for random selection in case of ties during prediction |
void |
setThreshold(double t)
The threshold for obtaining the bipartition from probabilities |
Methods inherited from class mulan.classifier.transformation.TransformationBasedMultiLabelLearner |
---|
getBaseClassifier, getTechnicalInformation, globalInfo |
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 |
Field Detail |
---|
protected boolean makePredictionsBasedOnConfidences
protected double threshold
protected LabelPowersetTransformation transformation
protected Random Rand
Constructor Detail |
---|
public LabelPowerset(Classifier classifier)
classifier
- the base single-label classification algorithmMethod Detail |
---|
public void setMakePredictionsBasedOnConfidences(boolean value)
value
- the threshold's valuepublic void setSeed(int s)
s
- the seedpublic void setThreshold(double t)
t
- public void setConfidenceCalculationMethod(int method)
method
- protected void buildInternal(MultiLabelInstances mlData) throws Exception
MultiLabelLearnerBase
MultiLabelInstances
training data set. This method is called from MultiLabelLearnerBase.build(MultiLabelInstances)
method,
where behavior common across all learners is applied.
buildInternal
in class MultiLabelLearnerBase
mlData
- the training data set
Exception
- if learner model was not created successfullyprotected MultiLabelOutput makePredictionInternal(Instance instance) throws Exception
MultiLabelLearnerBase
MultiLabelLearnerBase.makePrediction(weka.core.Instance)
which guards for model
initialization and apply common handling/behavior.
makePredictionInternal
in class MultiLabelLearnerBase
instance
- the data instance to predict on
Exception
- if an error occurs while making the prediction.
InvalidDataException
- if specified instance data is invalid and can not be processed by the learner
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |