## 2 Materials and Methods
### Definition of a Post-Processing Algorithm  
The incorrect classifications do not all have the same weight: for example, a scenario 4 (stable curve) mistaken as a scenario 5 (increasing curve) represents a less impactful error compared to a scenario 5 (increasing curve) mistaken as a scenario 1 (no diffusion at all). Accordingly, it was decided to exploit the probabilities of classification as provided in output by the machine learning algorithm, thus implementing a fourth step of results post-processing to enhance representativeness and usability. To this aim, a secondary label was assigned, representing the second-likely scenario expected from the model output. The assignment of the secondary label is based on the distributions of the classification probabilities for the different combinations of expected and occurred scenarios, computed on the test set repeatedly for the 10-fold iterations, with the following procedure (graphically represented in Figure 2):  
Figure 2: Block schema of the algorithm implemented for the assignment of a ‘double’ label, based on post-processing of the probability of assignment of each label by a machine-learning algorithm forsupervised learning in a multi-variate classification task (5 classes in this example). All records in the training set with a certain combination of predicted and true label (XY) are considered, and the median value of the distribution (across all these records) of the probability of assignment of each label is computed (DistP_1... DistP_5). When a new record must be classified, the first digit of the 'double' label corresponds to the label with the highest probability (predicted label). If the probability of assignment of such label is above the median of the probabilities of assignment across all records in the training set where that label was assigned, and corresponds to the true label, the label is also chosen as the second digit (scenario represented in panel (**A**)). Otherwise, if this condition does not stand (panel (**B**)), all the records with the same predicted label (X) in the training set are considered, and the sum of the absolute difference between the median values of the probabilities distributions in the training set (DistP_1... DistP5) and the probabilities value of the new record (Prob_1... Prob_5) is computed separately on each scenario actually occurred (true label, Y): the true label for which this sum is minimal is chosen as the second digit for the 'double' label. For every combination of automatically assigned label (expected scenario) and true label (occurred scenario), all the records showing that combination are selected, and the median of all the probability values (as provided in output by the machine learning algorithm) of all these records is computed; e.g., for all the \(i\) records with main predicted label = \(x\) and true label = \(y\), all probabilities \(p1 xy_{i}\) (probability of assignment of label 1 for record \(i\))... \(p5 xy_{i}\) (probability of assignment of label 5 for record \(i\)) are collected, and the median values \(\overline{p1 xy}\)... \(\overline{p5 xy}\) are computed across all records; \(\overline{p1 xy}\)... \(\overline{p5 xy}\) are computed for every \(x=1\)... 5 and \(y=1\)... 5 (\(x\) and \(y\) can coincide). If the main predicted label has an assignment probability that is equal or above the median value across all records where the occurred scenario coincides with the predicted one, the second label coincides with the first one; e.g., if a record has a predicted label = \(x\), and \(px_{xx,i}\geq\overline{px_{xx}}\), the second label will be \(x\).