In machine learning, multi-label classification and the strongly related problem of multi-output classification are variants of the classification problem where multiple labels may be assigned to each instance. Multi-label classification is a generalization of multiclass classification, which is the single-label problem of categorizing instances into precisely one of more than two classes; in the multi-label problem there is no constraint on how many of the classes the instance can be assigned to.
Formally, multi-label classification is the problem of finding a model that maps inputs x to binary vectors y (assigning a value of 0 or 1 for each element (label) in y).
Video Multi-label classification
Problem transformation methods
Several problem transformation methods exist for multi-label classification; the baseline approach, called the binary relevance method, amounts to independently training one binary classifier for each label. Given an unseen sample, the combined model then predicts all labels for this sample for which the respective classifiers predict a positive result. Although this method of dividing the task into multiple binary tasks may resemble superficially the one-vs.-all (OvA) and one-vs.-rest (OvR) methods for multiclass classification, it is essentially different from both, because a single classifier under binary relevance deals with a single label, without any regard to other labels whatsoever.
Various other transformations exist. Of these, the label powerset (LP) transformation creates one binary classifier for every label combination attested in the training set. The random k-labelsets (RAKEL) algorithm uses multiple LP classifiers, each trained on a random subset of the actual labels; prediction using this ensemble method proceeds by a voting scheme.
Classifier chains are an alternative ensembling methods that have been applied, for instance, in HIV drug resistance prediction. Bayesian network was also applied to guide ordering of classifiers in the Classifier chains .
Maps Multi-label classification
Adapted algorithms
Some classification algorithms/models have been adaptated to the multi-label task, without requiring problem transformations. Examples of these include:
- boosting: AdaBoost.MH and AdaBoost.MR are extended versions of AdaBoost for multi-label data.
- k-nearest neighbors: the ML-kNN algorithm extends the k-NN classifier to multi-label data.
- decision trees: "Clare" is an adapted C4.5 algorithm for multi-label classification; the modification involves the entropy calculations. MMC, MMDT, and SSC refined MMDT, can classify multi-labeled data based on multi-valued attributes without transforming the attributes into single-values. They are also named multi-valued and multi-labeled decision tree classification methods.
- kernel methods for vector output
- neural networks: BP-MLL is an adaptation of the popular back-propagation algorithm for multi-label learning.
Learning paradigms
Based on learning paradigms, the existing multi-label classification techniques can be classified into batch learning and online machine learning. Batch learning algorithms require all the data samples to be available beforehand. It trains the model using the entire training data and then predicts the test sample using the found relationship. The online learning algorithms, on the other hand, incrementally build their models in sequential iterations. In iteration t, an online algorithm receives a sample, xt and predicts its label(s) ?t using the current model; the algorithm then receives yt, the true label(s) of xt and updates its model based on the sample-label pair: (xt, yt). Recently, a new learning paradigm called the progressive learning technique has been developed. The progressive learning technique is capable of not only learning from new samples but also capable of learning multiple new labels of data being introduced to the model and yet retain the knowledge learnt thus far.
Statistics and evaluation metrics
The extent to which a dataset is multi-label can be captured in two statistics:
- Label cardinality is the average number of labels per example in the set: ;
- Label density is the number of labels per sample divided by the total number of labels, averaged over the samples: where .
Evaluation metrics for multi-label classification performance are inherently different from those used in multi-class (or binary) classification, due to the inherent differences of the classification problem. If T denotes the true set of labels for a given sample, and P the predicted set of labels, then the following metrics can be defined on that sample:
- Hamming loss: the fraction of the wrong labels to the total number of labels, i.e. , where is the target and is the prediction. This is a loss function, so the optimal value is zero.
- The closely related Jaccard index, also called Intersection over Union in the multi-label setting, is defined as the number of correctly predicted labels divided by the union of predicted and true labels,
- Precision, recall and score: precision is , recall is , and is their harmonic mean.
- Exact match (also called Subset accuracy): is the most strict metric, indicating the percentage of samples that have all their labels classified correctly.
Cross-validation in multi-label settings is complicated by the fact that the ordinary (binary/multiclass) way of stratified sampling will not work; alternative ways of approximate stratified sampling have been suggested.
Implementations and datasets
Java implementations of multi-label algorithms are available in the Mulan and Meka software packages, both based on Weka.
The scikit-learn Python package implements some multi-labels algorithms and metrics.
The binary relevance method, classifier chains and other multilabel algorithms with a lot of different base learners are implemented in the R-package mlr.
A list of commonly used multi-label data-sets is available at the Mulan website.
See also
- Multiclass classification
- Multiple-instance learning
- Structured prediction
- life-time of correlation
References
Further reading
- Madjarov, Gjorgji; Kocev, Dragi; Gjorgjevikj, Dejan; D?eroski, Sa?o (2012). "An extensive experimental comparison of methods for multi-label learning". Pattern Recognition. 45 (9): 3084-3104. doi:10.1016/j.patcog.2012.03.004.
Source of article : Wikipedia