# Multi-Label Classification Based on Associations
## 3 ML-CBA Algorithm
3.3 For each subset, capture all the positive local correlations among labels, with respect to the HSDF transformation order, and the _minacc_ threshold (50%)these correlations are considered as local; since they have been captured among a smaller subset of the dataset, and used only when the predicted number of class labels matches the subset with this number of class labels. 3.4 For each label, merge all the captured positive local correlations in the previous step, with respect to the Accuracy of the association rules. Step 4: Amend all classes that have significant positive associations with the class under processing, to the consequent of the selected single label CAR, with respect to the predicted number of labels. Step 5: Sort the new multi-label rules according to Algorithm 3. Step 6: Use the sorted multi-label rule resulted from Step 5 to classify any new instance. End. ```

**Algorithm 2** ML-CBA algorithm. Figure 4 illustrates the step of constructing several sub-datasets in order to simplify the capturing of positive local dependencies among labels, considering the predicted total

Figure 3: Number of labels associated with a stage of instance learning. number of class labels associated to an example. More information regarding this step is given in Algorithm 2, Step 3. Algorithm 2 illustrates the phase of predicting the number of class labels that might be linked to an example (instance). Figure 4 illustrates the step of constructing several sub-datasets in order to simplify the capturing of positive local dependencies among labels, considering the predicted total number of class labels associated to an example. After the construction of the multi-label rules, these rules are ordered and sorted, especially the rules with the same consequences. If more than one single-label CARs foretell the same class label, then, the one which has the greater confidence will be applied first, as depicted in Algorithm 3. If there are several single-label CARs with equal confidence, then, the multi-label rule which has the highest average of the association rules used to produce its consequent is fired. If a tie still exists, the single-label CAR rule with the highest support will be chosen. The rule with the highest cardinality will be removed if more than one rule has equivalent values for the aforementioned criteria. In the end, if the scores are still tied, the fired rule will be determined by a coin toss. ```
0: Set of multi-label CARs
0: Sorted multi-label CARs
``` For any two given rules r1 and r2, r1 precedes r2 if: 1. The confidence of r1 is higher than that of r2. 2. Both rules have the same confidence value, but the average accuracy of association rules that form the consequent of r1 is higher than that of r2. 3. Both rules have the same confidence value, and the same association rules accuracy average, but r1 has a higher support than that of r2. 4. Both rules have the same confidence value, the same association rules accuracy average, the same support value, but r1 has a lower cardinality than that of r2. 5. Chose randomly when the four previous conditions are the same for r1 and r2

Figure 4: Dividing the input dataset into several subsets. ### Classification Phase in ML-CBA

The ML-CBA prediction method works as follows: when a test case is being processed, and before determining the expected class label, it first considers all SL rules learned by msCBA algorithm during the transformation phase. Second, it estimates the possible number of class labels linked to a test example using the classifier learnt in the previous step. ML-CBA determines the subset and resorts all local positive dependencies with the expected class according to the consequence of the triggered rule from the transformation phase, using the predicted class and the predicted total number of class labels linked to an instance. ### Evaluation of the Proposed ML-CBA Algorithm

In this subsection, we will discuss the testing procedure of the suggested ML-CBA approach. The proposed strategy has been programmed using Java.