## 3 Materials and Methods
### Weighted Classification Confidence Score  
For the comparative evaluation of the models, we move beyond the standard performance metrics, such as accuracy, precision, and recall, which were previously analyzed. Additionally, we will introduce a new indicator incorporating an object's percentage probabilities in each category. In this way, we analyze the capacity of the model to extrapolate knowledge. The indicator, the Weighted Classification Confidence Score (\(WCCS\)), assesses the classification performance by analyzing the probability percentages for each waste category, normalized by their importance, and addresses cases where multiple probabilities for the same category are present. The \(WCCS\) is computed by Equation (6). \[WCCS=\frac{\sum_{k=1}^{4}P_{k}\times(1-\delta_{k})}{1+Variance(P_{1},P_{2},\ \dots,\ P_{N})}\times 100\ [ \%], \tag{6}\]  
where  
\(WCCS\) is the Weighted Classification Confidence Score;  
\(P_{k}\) is the associated probability for each waste category;  
\(\delta_{k}\) is the overlapping probabilities within the same waste category (set to zero if no multiple predictions for the same category are provided);  
\(N\) is the number of identified probabilities;  
\(Variance(P_{1},\ P_{2},\ \dots,\ P_{N})\) measures how spread out the probabilities are. A higher variance means the model is more confident in one waste category (dominant), and a lower variance means indecision between waste categories. It is computed by Equation (7). \[Variance(P_{1},P_{2},\ \dots,\ P_{N})=\frac{\sum_{k=1}^{N}(P_{k}-\mu)^{2}}{N}, \tag{7}\]  
where  
\(\mu\) is the mean of the probabilities, calculated by Equation (8). \[\mu=\frac{\sum_{k=1}^{N}P_{k}}{N}, \tag{8}\]  
Including percentage probabilities is valuable because it provides additional context beyond binary or single-label predictions. For instance, considering that an object belongs to the plastic category, the model indicates a 90% probability for plastic, 7% for glass, and 3% for cardboard. This information helps calculate the \(WCCS\) with the main purpose of identifying the trust in the predicted category. The proposed \(WCCS\) has the following advantages:  
* It captures the model's confidence for all categories simultaneously, ensuring that borderline cases are represented;  
Figure 7: Workflow for CWSM training and evaluation. * It penalizes over-confidence or misclassification when multiple probabilities overlap for the same category;
* It incorporates waste category-specific importance through weights;
* It measures the performance of waste category-specific complexities. If the denominator category has a lower level, the _WCCS_ value increases. When the dominant category is identified, the _WCCS_'s confidence in its prediction decreases. Next, we analyze two opposite scenarios. The first is the perfect classification; the first class has 100% identification, and the other three have 0%. For this case, the mean probability \(\mu\) is 0.25. The variance is calculated as follows:  
\[Variance=\frac{\left(1-0.25\right)^{2}+\left(0-0.25\right)^{2}+\left(0-0.25 \right)^{2}+\left(0-0.25\right)^{2}}{4}=0.1875\]  
Using this variance value, the _WCCS_ is as follows:  
\[WCCS=\frac{1+0+0+0}{1+0.1875}\times 100=0.842\times 100=84.2\%\]  
As a result, the perfect classification scenario is to identify the _WCCS_ with the 84.2% value. The scenario where all classes are identified with the same 25% value is analyzed at the opposite corner. The mean value is calculated as 0.25. The variance is as follows:  
\[Variance=\frac{\left(0.25-0.25\right)^{2}+\left(0.25-0.25\right)^{2}+\left( 0.25-0.25\right)^{2}+\left(0.25-0.25\right)^{2}}{4}=0\]  
Next, the _WCCS_ is calculated as follows:  
\[WCCS=\frac{0.25+0.25+0.25+0.25}{1+0}\times 100=1.00\times 100=100\%\]  
Using this reasoning, we conclude that the _WCCS_ has an 84.2% value for the ideal scenario. When the CWSM value increases, the meaning of this behavior is the incapacity of the model to distinguish between categories.