## 2 Materials and Methods
### Statistical Analysis  
Prior to providing a description of the analytical setup, it is important to note that the effect of well-known confounding factors, also known as covariates, was controlled for in all of the analytical steps described below. In the frame of this work, we controlled for the effect of participants' age, gender, and L-dopa [41] (topaminergic medication). To assess the strength of the relationship between the computed handwriting features and patient's clinical data (UPDRS V and PD duration), we computed the partial [PERSON]'s correlation coefficient (assessment of a linear relationship), as well as the partial [PERSON]'s correlation coefficient (assessment of a monotonic relationship). With this approach, we aimed to identify the handwriting features that are significantly correlated with the clinical measures under focus and also to compare \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Movement** & **FD (Count)** & **Conventional (Count)** & **Together (Count)** \\ \hline on-surface & 4536 & 618 & 5154 \\ in-air & 2916 & 404 & 3320 \\ \hline together & 7452 & 1022 & 8474 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Feature sets matrix. the FD features with conventional ones. A significance level of correlation (\(p\)) of 0.05 was selected for both of the correlation types. Only the results with a \(p\)-value below the significance level in both correlation coefficients were considered statistically significant. Next, to evaluate and compare the power of the handwriting features to discriminate PD patients and HC, multivariate binary classification analysis was performed. For this purpose, state-of-the-art gradient boosted trees were employed. Specifically, we used the famous XGBoost algorithm [49]. The XGBoost algorithm was chosen for its ability to achieve a good performance, even for small datasets; its inherent robustness to outliers; its ability to model complex interdependencies in the data; and also its recent successes in the field of machine learning (e.g., the winning algorithm in many www.kaggle.com competitions). To train and evaluate the models, we used the following supervised learning setup: stratified 10-fold cross-validation with 20 repetitions. The performance of the trained classification models was evaluated by Matthew's correlation coefficient (MCC) [50], classification accuracy (ACC), sensitivity (SEN), and specificity (SPE), which are defined as follows:  
\[\text{MCC}=\frac{\text{TP}\times\text{TN}-\text{FP}\times\text{FN}}{\sqrt{( \text{TP}+\text{FP})(\text{TP}+\text{FN})(\text{TN}+\text{FP})(\text{TN}+\text {FN})}}, \tag{6}\]  
\[\text{ACC}=\frac{\text{TP}+\text{TN}}{\text{TP}+\text{TN}+\text{FP}+\text{ FN}}\cdot 100\,[\%], \tag{7}\]  
\[\text{SEN}=\frac{\text{TP}}{\text{TP}+\text{FN}}\cdot 100\,[\%], \tag{8}\]  
\[\text{SPE}=\frac{\text{TN}}{\text{TN}+\text{FP}}\cdot 100\,[\%], \tag{9}\]  
where TP is the number of true positives, TN is the number of true negatives, FP is the number of false positives, and FN is the number false negatives. Finally, to evaluate and compare the power of the handwriting features' ability to predict the values of the selected clinical characteristics (UPDRS V and PD duration), multivariate regression analysis was performed. For this purpose, the same boosting tree algorithm (XGBoost) and the supervised learning setup were used.