|
|||||||||
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.EnsembleOfSubsetLearners
public class EnsembleOfSubsetLearners
A class for gathering several different SubsetLearners into a composite ensemble model. <br> <br> The label set partitions for participation in ensemble are selected using their dependence weight from the large number of randomly generated possible partitions. The type of the learned dependencies is determined by the {@link mulan.data.LabelPairsDependenceIdentifier} supplied to the class constructor. Two strategies for selecting ensemble partitions exists: (1) to select the highly weighted ones and (2) to select most different from the highly weighted ones. The strategy to be used is determined by the {@link #selectDiverseModels} parameter which is 'true' by default.
For more information, see
Lena Tenenboim-Chekina, Lior Rokach,, Bracha Shapira: Identification of Label Dependencies for Multi-label Classification. In: , Haifa, Israel, 53--60, 2010.
@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 |
---|
Fields inherited from class mulan.classifier.meta.MultiLabelMetaLearner |
---|
baseLearner |
Fields inherited from class mulan.classifier.MultiLabelLearnerBase |
---|
featureIndices, labelIndices, numLabels |
Constructor Summary | |
---|---|
EnsembleOfSubsetLearners()
Default constructor. |
|
EnsembleOfSubsetLearners(MultiLabelLearner aMultiLabelLearner,
Classifier aSingleLabelLearner,
LabelPairsDependenceIdentifier aDependenceIdentifier,
int models)
Initialize EnsembleOfSubset with multilabel and single label learners, a method for labels dependence identification and number of models to constitute the ensemble. |
Method Summary | |
---|---|
protected void |
buildInternal(MultiLabelInstances trainingData)
Builds an ensemble of Subset models. |
List<int[][]> |
createRandomSets(int numLabels,
int numSets)
Creates the specified number of randomly generated possible label set partitions consisting of the specified number of labels.. |
int |
getNumModels()
|
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. |
boolean |
isSelectDiverseModels()
|
protected MultiLabelOutput |
makePredictionInternal(Instance instance)
Makes classification prediction using constructed ensemble of Subset models. |
static String |
partitionToString(int[][] partition)
Returns a string representation of the labels partition. |
void |
setDependenceIdentifier(LabelPairsDependenceIdentifier dependenceIdentifier)
|
static void |
setDynamicDiversityThreshold(double dynamicDiversityThreshold)
|
void |
setNumModels(int models)
|
static void |
setNumOfPartitionsForDiversity(int numOfPartitionsForDiversity)
|
static void |
setNumOfRandomPartitions(int numOfRandomPartitions)
|
void |
setRnd(Random rnd)
|
void |
setSeed(int x)
|
void |
setSelectDiverseModels(boolean selectDiverseModels)
|
void |
setThreshold(double threshold)
|
void |
setUseSubsetLearnerCache(boolean useSubsetcache)
|
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 |
---|
public EnsembleOfSubsetLearners()
public EnsembleOfSubsetLearners(MultiLabelLearner aMultiLabelLearner, Classifier aSingleLabelLearner, LabelPairsDependenceIdentifier aDependenceIdentifier, int models)
aMultiLabelLearner
- the learner for multilabel classificationaSingleLabelLearner
- the learner for single label classificationaDependenceIdentifier
- the method for label pairs dependence
identificationmodels
- the number of modelsMethod Detail |
---|
public TechnicalInformation getTechnicalInformation()
MultiLabelLearnerBase
getTechnicalInformation
in interface TechnicalInformationHandler
getTechnicalInformation
in class MultiLabelLearnerBase
protected void buildInternal(MultiLabelInstances trainingData) throws Exception
dependenceIdentifier
and value of
the selectDiverseModels
parameter.
buildInternal
in class MultiLabelLearnerBase
trainingData
- the training data set
Exception
- if learner model was not created successfullyprotected MultiLabelOutput makePredictionInternal(Instance instance) throws Exception
makePredictionInternal
in class MultiLabelLearnerBase
instance
- the data instance to predict on
MultiLabelOutput
classification
prediction for the instance.
Exception
InvalidDataException
- if specified instance data is invalid and can not be processed by the learnerpublic List<int[][]> createRandomSets(int numLabels, int numSets)
numLabels
- - number of labelsnumSets
- - number of random partitions to generate
public static String partitionToString(int[][] partition)
partition
- - a label set partition
public void setRnd(Random rnd)
rnd
- public void setThreshold(double threshold)
threshold
- public void setDependenceIdentifier(LabelPairsDependenceIdentifier dependenceIdentifier)
dependenceIdentifier
- public void setSeed(int x)
x
- public void setNumModels(int models)
models
- public int getNumModels()
public boolean isSelectDiverseModels()
public void setSelectDiverseModels(boolean selectDiverseModels)
selectDiverseModels
- public void setUseSubsetLearnerCache(boolean useSubsetcache)
useSubsetcache
- public static void setNumOfRandomPartitions(int numOfRandomPartitions)
numOfRandomPartitions
- public static void setNumOfPartitionsForDiversity(int numOfPartitionsForDiversity)
numOfPartitionsForDiversity
- public static void setDynamicDiversityThreshold(double dynamicDiversityThreshold)
dynamicDiversityThreshold
- public String globalInfo()
MultiLabelLearnerBase
globalInfo
in class MultiLabelLearnerBase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |