|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mulan.classifier.MultiLabelLearnerBase mulan.classifier.meta.MultiLabelMetaLearner mulan.classifier.meta.SubsetLearner
public class SubsetLearner
A class for learning a classifier according to disjoint label subsets: a multi-label learner (the Label Powerset by default) is applied to subsets with multiple labels and a single-label learner is applied to single label subsets. The final classification prediction is determined by combining labels predicted by all the learned models. Note: the class is not multi-thread safe. <br> <br> There is a mechanism for caching and reusing learned classification models. The caching mechanism is controlled by {@link #useCache} parameter.
For more information, see
Lena Tenenboim, Lior Rokach,, Bracha Shapira: Multi-label Classification by Analyzing Labels Dependencies. In: , Bled, Slovenia, 117--132, 2009.
Lena Tenenboim-Chekina, Lior Rokach,, Bracha Shapira: Identification of Label Dependencies for Multi-label Classification. In: , Haifa, Israel, 53--60, 2010.
@inproceedings{LenaTenenboim2009, address = {Bled, Slovenia}, author = {Lena Tenenboim, Lior Rokach, and Bracha Shapira}, pages = {117--132}, title = {Multi-label Classification by Analyzing Labels Dependencies}, volume = {Proc. ECML/PKDD 2009 Workshop on Learning from Multi-Label Data (MLD'09)}, year = {2009} } @inproceedings{LenaTenenboim-Chekina2010, address = {Haifa, Israel}, author = {Lena Tenenboim-Chekina, Lior Rokach, and Bracha Shapira}, pages = {53--60}, title = {Identification of Label Dependencies for Multi-label Classification}, volume = {Proc. ICML 2010 Workshop on Learning from Multi-Label Data (MLD'10}, year = {2010} }
Field Summary | |
---|---|
protected Classifier |
baseSingleLabelClassifier
Base single-label classifier that will be used for training and predictions |
Fields inherited from class mulan.classifier.meta.MultiLabelMetaLearner |
---|
baseLearner |
Fields inherited from class mulan.classifier.MultiLabelLearnerBase |
---|
featureIndices, labelIndices, numLabels |
Constructor Summary | |
---|---|
SubsetLearner()
Default constructor |
|
SubsetLearner(int[][] labelsSubsets,
Classifier singleLabelClassifier)
Initialize the SubsetLearner with labels subsets partitioning and single label learner. |
|
SubsetLearner(int[][] labelsSubsets,
MultiLabelLearner multiLabelLearner,
Classifier singleLabelClassifier)
Initialize the SubsetLearner with labels set partitioning, multilabel and single label learners. |
|
SubsetLearner(LabelClustering clusteringMethod,
MultiLabelLearner multiLabelLearner,
Classifier singleLabelClassifier)
Initialize the SubsetLearner with a label clustering method, multilabel and single label learners. |
Method Summary | |
---|---|
protected void |
buildInternal(MultiLabelInstances trainingSet)
We get the initial dataset through trainingSet. |
String |
getModel()
Returns a string representation of the model |
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. |
MultiLabelOutput |
makePredictionInternal(Instance instance)
We make a prediction using a different method depending on whether the split has one or more labels |
void |
resetRandomSeed(Object model)
Invokes the setSeed(1) or setRandomSeed(1) method of the supplied object's Class, if such method exist. |
void |
resetSubsets(int[][] labelsSubsets)
Reset the label set partitioning. |
void |
setSeed()
Set random seed of all internal Learners to 1. |
void |
setUseCache(boolean useCache)
Sets whether cache mechanism will be used |
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 |
Field Detail |
---|
protected Classifier baseSingleLabelClassifier
Constructor Detail |
---|
public SubsetLearner()
public SubsetLearner(int[][] labelsSubsets, Classifier singleLabelClassifier)
LabelPowerset
method initialized
with the specified single label learner.will be used as multilabel
learner.
labelsSubsets
- subsets of dependent labelssingleLabelClassifier
- method used for single label classificationpublic SubsetLearner(int[][] labelsSubsets, MultiLabelLearner multiLabelLearner, Classifier singleLabelClassifier)
labelsSubsets
- subsets of dependent labelsmultiLabelLearner
- method used for multilabel classificationsingleLabelClassifier
- method used for single label classificationpublic SubsetLearner(LabelClustering clusteringMethod, MultiLabelLearner multiLabelLearner, Classifier singleLabelClassifier)
clusteringMethod
- multiLabelLearner
- method used for multilabel classificationsingleLabelClassifier
- method used for single label classificationMethod Detail |
---|
public void resetSubsets(int[][] labelsSubsets)
labelsSubsets
- - new label set partitioningprotected void buildInternal(MultiLabelInstances trainingSet) throws Exception
buildInternal
in class MultiLabelLearnerBase
trainingSet
- The initial MultiLabelInstances
dataset
Exception
public void resetRandomSeed(Object model)
model
- which random seed should be reset.public void setSeed()
public MultiLabelOutput makePredictionInternal(Instance instance) throws Exception
makePredictionInternal
in class MultiLabelLearnerBase
instance
- the instance for classification prediction
MultiLabelOutput
classification
prediction for the instance
Exception
InvalidDataException
- if specified instance data is invalid and can not be processed by the learnerpublic void setUseCache(boolean useCache)
useCache
- whether cache mechanism will be usedpublic TechnicalInformation getTechnicalInformation()
MultiLabelLearnerBase
getTechnicalInformation
in interface TechnicalInformationHandler
getTechnicalInformation
in class MultiLabelLearnerBase
public String getModel()
public String globalInfo()
MultiLabelLearnerBase
globalInfo
in class MultiLabelLearnerBase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |