# Enhancing Data Integrity in Blockchain Oracles Through Multi-Label Analysis
## 3 Methods
### Selection of Methods and Evaluation Based on State-of-the-Art Metrics  
In the fourth phase, modeling, machine learning algorithms were selected and applied to address the classification problem, which was considered a relevant aspect of data integrity analysis. The process began with a literature review, during which we identified the best multi-label classification algorithms to evaluate data as either integral or non-integral. In this context, we used multi-label classification algorithms to assign multiple labels that describe the data quality, considering various strategies and metrics to select the most suitable ones for the proposal [13]. Among the approaches considered, the Binary Relevance algorithm was identified, which treats each label as an independent binary classification problem; however, its limitation lies in not accounting for the interrelationships between labels. In contrast, Classifier Chains allow previous label predictions to influence subsequent ones, capturing dependencies between them more effectively [36]. The Label Powerset approach converts the multi-label problem into a multi-class classification problem, treating each unique combination of labels as a class, which can be efficient if the number of combinations is limited [14]. Although traditionally applied in multi-class classification, the One-vs-Rest method adapts to multi-label problems by training a classifier for each label [37]. Finally, the Ensemble approach (RakelD) utilizes a set of classifiers to improve overall accuracy by combining classifications from different models and leveraging the advantages of chained classifiers [38]. These algorithms were evaluated using specific metrics for multi-label classification, such as Exact Match, Precision, Recall, F1 Score, and Hamming Precision. While there are different metrics, we used the most prominent ones, the Hamming Precision and the Exact Match ratio, as they effectively represent the models' performance in classifying data based on integrity [37]. Hamming Precision is the proportion of correct labels about the total number of labels. On the other hand, Exact Match measures the percentage of instances where all predicted labels exactly match the actual labels. This allowed for a comprehensive evaluation of the models' classification performance. Figure 4 exposes the evaluation results. We used an Analysis of Variance (ANOVA) to validate the results in Figure 5. This allowed us to identify significant differences between the classification algorithms evaluated: Binary Relevance, Classifier Chains, Label Powerset, One-vs-Rest, and Ensemble  
Figure 4: Evaluation results of multi-label classification algorithms for data integrity assessment. (RakelD) [39]. With an F-statistic of approximately 13.22 and a \(p\)-value of 2.00404, we concluded that at least two classification methods have significantly distinct performances. The Ensemble (RakelD) approach was the best algorithm, consistently showing the highest metrics. This approach is particularly advantageous in imbalanced datasets or those with noise. Combining multiple models enables the ensemble to capture patterns from different classes and mitigate the bias toward the majority class. Furthermore, in the presence of noise, the ensemble compensates for the errors of individual models, thereby improving the overall accuracy of the predictions. After identifying that Ensemble Learning is the most suitable approach to address the data integrity issue, several variants of this method were evaluated, including Bagging and Boosting, through state-of-the-art algorithms.