|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mulan.data.GreedyLabelClustering
public class GreedyLabelClustering
A class for clustering dependent label pairs into disjoint subsets.
The type of the learned dependencies is determined by the
LabelPairsDependenceIdentifier
supplied to the class constructor. The
clustering process is straightforward: initially all labels are assumed to be independent. Then
we start group the label pairs according to their dependence score from most to least dependent.
An SubsetLearner is build for each new partition and its accuracy is evaluated in terms of the
measure
. The process of grouping labels continues as long as the accuracy improves (or
at least is not reduced). A number of steps specified by allowedNonImprovementSteps
without seeking any concomitant improvement in the accuracy is allowed. Such a �non-useful�
partitions are filtered out and the algorithm continues to evaluate subsequent pairs of dependent
labels until one of the stop conditions is reached. The possible stop conditions are:
- no more label pairs to consider;
- all labels are clustered into one single group;
- pair dependence score is below the specified criticalValue
;
- the number of allowedNonImprovementSteps
is exceeded.
Constructor Summary | |
---|---|
GreedyLabelClustering(MultiLabelLearner aMultiLabelLearner,
Classifier aSingleLabelLearner,
LabelPairsDependenceIdentifier dependenceIdentifier)
Initialize the GreedyLabelClustering with multilabel and single label learners and a method for labels dependence identification. |
Method Summary | |
---|---|
int[][] |
determineClusters(MultiLabelInstances trainingSet)
Determines labels partitioning into dependent sets. |
int |
getAllowedNonImprovementSteps()
|
double |
getCriticalValue()
|
Measure |
getMeasure()
|
MultiLabelLearner |
getMultiLabelLearner()
|
int |
getNumFolds()
|
Classifier |
getSingleLabelLearner()
|
boolean |
isInternalSubsetLearnerDebug()
|
boolean |
isUseSubsetLearnerCache()
|
static String |
partitionToString(int[][] partition)
Returns a string representation of the labels partition. |
void |
setAllowedNonImprovementSteps(int allowedNonImprovementSteps)
|
void |
setCriticalValue(double criticalValue)
|
void |
setInternalSubsetLearnerDebug(boolean internalSubsetLearnerDebug)
|
void |
setMeasure(Measure measure)
|
void |
setNumFolds(int numFolds)
|
void |
setUseSubsetLearnerCache(boolean useSubsetLearnerCache)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GreedyLabelClustering(MultiLabelLearner aMultiLabelLearner, Classifier aSingleLabelLearner, LabelPairsDependenceIdentifier dependenceIdentifier)
aMultiLabelLearner
- - a learner for multilabel classificationaSingleLabelLearner
- - a learner for single label classificationdependenceIdentifier
- - a method for label pairs dependence identificationMethod Detail |
---|
public int[][] determineClusters(MultiLabelInstances trainingSet)
determineClusters
in interface LabelClustering
trainingSet
- the training data set
public static String partitionToString(int[][] partition)
partition
- - a label set partition
public int getNumFolds()
public void setNumFolds(int numFolds)
numFolds
- public Measure getMeasure()
public void setMeasure(Measure measure)
measure
- public int getAllowedNonImprovementSteps()
public void setAllowedNonImprovementSteps(int allowedNonImprovementSteps)
allowedNonImprovementSteps
- public double getCriticalValue()
public void setCriticalValue(double criticalValue)
criticalValue
- public Classifier getSingleLabelLearner()
public MultiLabelLearner getMultiLabelLearner()
public boolean isUseSubsetLearnerCache()
public void setUseSubsetLearnerCache(boolean useSubsetLearnerCache)
useSubsetLearnerCache
- public boolean isInternalSubsetLearnerDebug()
public void setInternalSubsetLearnerDebug(boolean internalSubsetLearnerDebug)
internalSubsetLearnerDebug
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |