## 3 Results
### Evaluation of Weighted Endpoint Accuracy Score  
The utility of the proposed WEAS is evaluated using the confusion matrix derived from the test set after the ML model was trained on Dataset B (see Figure 2b). It is important to note that the confusion matrix reflects the model's performance on the independent test (or validation) data, not on the training data itself. Thus, the total number of instances reported in the confusion matrix corresponds to the size of the test set used for evaluation, rather than the dataset used for model training. This distinction is relevant, as the confusion matrix and associated metrics (such as WEAS) provide an assessment of how well the trained model generalizes to unseen data, rather than its performance on the data it was trained on.  
For this 5-class problem (with class labels 0-4, where class 0 signifies healthy patients and class 4 represents severe pathology), the per-class accuracies, as reported in Figure 2b, are as follows:  
\[\text{Acc}_{0}\approx 89.47\%,\quad\text{Acc}_{1}\approx 60.61\%,\quad\text{ Acc}_{2}\approx 64.86\%,\quad\text{Acc}_{3}\approx 81.82\%,\quad\text{ Acc}_{4}\approx 91.67\%.\]  
Recognizing the higher clinical importance of correctly predicting the endpoints (classes 0 and 4), we assign them a weight \(w=2\), while the intermediate classes (1, 2, and 3) remain unweighted (i.e., weight = 1). The overall WEAS (Equation (30)) is defined as  
\[\text{WEAS}=\frac{w\cdot\text{Acc}_{0}+\sum_{i=1}^{3}\text{Acc}_{i}+w\cdot \text{Acc}_{4}}{2w+3}.\]  
Substituting the computed accuracies with \(w=2\), we obtain:  
\[\text{WEAS}=\frac{2(0.8947)+0.6061+0.6486+0.8182+2(0.9167)}{7}\approx\frac{5.6 956}{7}\approx 0.8137.\]  
This metric indicates an overall utility of approximately 81.4%, underscoring the model's strong performance on the clinically critical endpoints.  
An extension to the WEAS incorporates a misclassification penalty that accounts for the severity of off-diagonal errors. With a distance penalty defined as \(d(i,j)=|i-j|\), the cumulative penalty for misclassifications is given by  
\[\text{Penalty}=\frac{\sum_{i\
eq j}|i-j|\,M(i,j)}{\text{Total Instances}}.\]  
For the ML model trained on Dataset B, yielding the following confusion matrix  
\[\mathbf{M}=\begin{bmatrix}34&2&1&1&0\\ 12&20&1&0&0\\ 7&4&24&1&1\\ 0&2&2&36&4\\ 0&0&1&3&44\end{bmatrix}.\]  
the penalty per row is computed as follows:  
* Row 0 (\(i=0\)): \(2\times 1+1\times 2+1\times 3=7\).
* Row 1 (\(i=1\)): \(12\times 1+1\times 1=13\).
* Row 2 (\(i=2\)): \(7\times 2+4\times 1+1\times 1+1\times 2=21\).
* Row 3 (\(i=3\)): \(2\times 2+2\times 1+4\times 1=10\).
* Row 4 (\(i=4\)): \(1\times 2+3\times 1=5\).  
Summing these penalties yields a total penalty of \(7+13+21+10+5=56\). Dividing by the total number of instances (\(38+33+37+44+48=200\)), we obtain  
\[\text{Penalty}=\frac{56}{200}=0.28.\]This penalty is then integrated into a composite utility function (Equation (32): \(U=\lambda\cdot\text{WEAS}-(1-\lambda)\cdot\text{Penalty}\)), where \(\lambda\in[0,1]\) is a parameter that balances the importance of endpoint accuracy against the cost of misclassification. For example, with \(\lambda=0.5\), the utility becomes  
\[U\approx 0.5(0.8137)-0.5(0.28)\approx 0.4069-0.14=0.2669.\]  
These findings indicate that, while the elevated WEAS (81.4%) demonstrates robust discrimination between healthy and severely ill patients, the composite utility metric \(U\) provides a more comprehensive evaluation by also accounting for the cost of misclassifications. Such an assessment aligns the model's evaluation with clinical priorities, ensuring that both endpoint accuracy and the severity of errors are appropriately reflected.