|
|||||||||
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.HMC
public class HMC
Class that implements a Hierarchical Multilabel classifier (HMC). HMC classifier takes as parameter any kind of multilabel classifier and builds a hierarchy. Any node of hierarchy is a classifier and is trained separately. The root classifier is trained on all data and as getting down the hierarchy tree the data is adjusted properly to each node. Firstly, instances that do not belong to the node are removed and then attributes that are unnecessary are removed also. For more information, see
Grigorios Tsoumakas, Ioannis Katakis, Ioannis Vlahavas: Effective and Efficient Multilabel Classification in Domains with Large Number of Labels. In: Proc. ECML/PKDD 2008 Workshop on Mining Multidimensional Data (MMD'08), 2008.
@inproceedings{Tsoumakas2008, author = {Grigorios Tsoumakas and Ioannis Katakis and Ioannis Vlahavas}, booktitle = {Proc. ECML/PKDD 2008 Workshop on Mining Multidimensional Data (MMD'08)}, title = {Effective and Efficient Multilabel Classification in Domains with Large Number of Labels}, year = {2008}, location = {Antwerp, Belgium} }
Field Summary |
---|
Fields inherited from class mulan.classifier.meta.MultiLabelMetaLearner |
---|
baseLearner |
Fields inherited from class mulan.classifier.MultiLabelLearnerBase |
---|
featureIndices, labelIndices, numLabels |
Constructor Summary | |
---|---|
HMC()
Default constructor |
|
HMC(MultiLabelLearner baseLearner)
Constructs a new instance |
Method Summary | |
---|---|
protected void |
buildInternal(MultiLabelInstances dataSet)
Learner specific implementation of building the model from MultiLabelInstances
training data set. |
protected void |
deleteInstances(Instances trainSet,
int attrIndex)
Deletes the unnecessary instances, the instances that have value 0 on given attribute. |
protected MultiLabelInstances |
deleteLabels(MultiLabelInstances mlData,
String currentLabel,
boolean keepSubTree)
Deletes the unnecessary attributes. |
long |
getNoClassifierEvals()
Reurns number of classifier evaluations |
long |
getNoNodes()
Returns the number of nodes |
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. |
long |
getTotalUsedTrainInsts()
Returns number of total instances used |
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. |
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 HMC()
public HMC(MultiLabelLearner baseLearner)
baseLearner
- the multi-label learner at each nodeMethod Detail |
---|
public TechnicalInformation getTechnicalInformation()
MultiLabelLearnerBase
getTechnicalInformation
in interface TechnicalInformationHandler
getTechnicalInformation
in class MultiLabelLearnerBase
protected void buildInternal(MultiLabelInstances dataSet) 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
dataSet
- 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 learnerprotected MultiLabelInstances deleteLabels(MultiLabelInstances mlData, String currentLabel, boolean keepSubTree) throws InvalidDataFormatException
mlData
- the instances from which the attributes will be removedcurrentLabel
- the name of the node whose children will be kept as attributeskeepSubTree
- whether to keep the subtree
InvalidDataFormatException
protected void deleteInstances(Instances trainSet, int attrIndex)
trainSet
- the trainSet on which the deletion will be appliedattrIndex
- the index of the attribute that the deletion is basedpublic long getNoNodes()
public long getNoClassifierEvals()
public long getTotalUsedTrainInsts()
public String globalInfo()
MultiLabelLearnerBase
globalInfo
in class MultiLabelLearnerBase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |