# Multi-Label Classification Based on Associations
## 3 ML-CBA Algorithm
high standard deviation first (HSDF) has been chosen as PTM. HSDF is a new PTM that attempts to maximize the capturing and the exploitation of the positive pairwise correlation among labels. this method works as follows: it starts with extracting the feature space of the dataset and considering the class label as a transactional dataset. Then, using predictive a priori, HSDF captures all the positive pairwise among labels. After that, it ranks the class labels according to the standard deviation of the accuracy of its correlation in a descendent fashion. The obtained rank is used to transform the original multi-label dataset to SL one. More information regarding HSDF and other PTMs could be found in [52]. Furthermore, predictive a priori and msCBA algorithms have been used as they have been implemented and programmed in KEEL with their default settings. KEEL which is short for knowledge extraction for evolutionary learning is an open source java based library for a large number of learning strategies and models in machine learning [54]. In the evaluation phase, ML-CBA has been compared to other MLC algorithms which take into account both global and local dependencies and come from a wide range of learning approaches. Currently, four forms of evaluation have been used (accuracy, Hamming loss, exact match, and one-error). Averaged across all instances, an accuracy metric indicates the fraction of correct predictions made for a given set of labels. Here is the formula that determines _accuracy_:

\[Accuracy=\frac{1}{t}\sum_{i=1}^{t}\frac{|(Zi\cap Yi)|}{|(Zi\cup Yi)|} \tag{1}\]

where:

_Zi_: the predicted label set

_Yi_: the ground truth label set

The Hamming Loss measures the typical amount of incorrectly labeled instances across all labels in a multi-label dataset. Inaccurate label predictions and missed labels are also accounted for in this metric. The lower this parameter's value, the better the classifier will perform. If we take the symmetric difference between the grounded truth label set and the expected set, we obtain an expression for the _Hamming loss_. \[Hamming\ Loss=\frac{1}{t}\sum_{i=1}^{t}\frac{1}{q}[Z_{i}\Delta Y_{i}] \tag{2}\]

where:

_q_: total number of labels

_t_: total number of instances. The Exact Match measure is particularly limiting since it gives equal weight to accurate and incorrect answers. In order to get this measure, the number of situations when the predicted label and the grounded truth label match-up is averaged. Maximizing the following equation will result in the best possible _exact match_:\[Exact\ Match=\frac{1}{t}\sum_{i=1}^{t}[Z_{i}=Y_{i}] \tag{3}\]

Finally, the number of times the most preferred label was not included in the final collection of projected labels is calculated using the one-error metric. Since this metric only considers the most prominent label and disregards the others, it is clear that it is insufficient for the MLC problem. The following formula may be used to determine how to compute the _one-error metric_:

\[One\text{-}Error=\frac{1}{t}\sum_{i=1}^{t}[argmin\tau_{i}(\lambda)\
otin Y_{i },\lambda\in\mathcal{L}] \tag{4}\]

Six different datasets that belong to MLC with unique features are being used in this paper; four are of typical dataset size (yeast, scene, emotions, and flags), while the other two are of big dataset size (Genbase and TMC2007). Table 1 provides a description of the six datasetsLCard is short for label cardinality and represents the average number of class labels per instance in the datasets. Tables 2-9 depict a comparison between the proposed ML-CBA algorithm and other MLC algorithms, using several evaluation metrics. The compared algorithms have been chosen to represent the three main MLC approaches. The first order approach which ignores any correlations among labels has been represented by two algorithms (BR and ML-KNN [39]). The second order approach which considers pairwise correlations only has been represented by two algorithms (BP-MLL [40] and CLR [55]).