## 5 Results
### Comparison of the Results of All Tested Models  
To compare the model predictions to the actual data, confusion matrices and various accuracy scores were used. These were calculated using scikit-learn library built-in functions. If the results were promising, a visual test and cross-validation were performed. In the case of logistic regression, the ROC curve was also tested. The initial models used the mentioned statistic indices (median, standard deviation, kurtosis, sample range, and interquartile range) as input parameters. Model evaluation was performed using a variety of measures mostly based on a confusion matrix [21]. To evaluate the model accuracy (the ratio of the sum of TP (true positive) and TN (true negative) to all observations), confusion matrix, sensitivity (the ratio of TP to P (all positive)), specificity (the ratio of TN to N (all negative)), negative predictive value (the ratio of TN to the sum of TN and FN (false negative)), precision (the ratio of TP to sum of TP and FP (false positive)), and F1 score (two times the ratio of the product of sensitivity and precision to the sum of sensitivity and precision) was used. Furthermore, the macro average and weighted average (based on some previously mentioned indicators) were utilized. Results were shown in Table 1.  
It can be noticed that the LDA and the logistic regression have the best accuracy scores, but neither predict any turns, making these models invalid. This shows how the sample imbalance problem can affect the result interpretation process. The LDA model has been additionally trained and tested on the data with kurtosis and standard deviation in logarithmic scale, to improve the underlying Gaussian distribution assumption. However, this did not significantly affect the results. In the case of logistic regression, the LASSO (Least Absolute Shrinkage and Selection Operator) regularization method was also utilized (for a set of alpha parameter values 0.001, 0.01, 0.1, 1.0, 10.0) to reduce the overfitting of the model. Unfortunately, this method finally did not improve the logistic regression results on the test sample. In addition to the above-mentioned methods, the support vector machine (SVM) model with various kernel functions (linear, polynomial, and radial), and different regularization parameter and kernel coefficient were also tested. Unfortunately, when unbalanced sample is considered, the best obtained results were very similar to those of logistic regression. For this reason, in Table 1, only the results for the SVM with linear kernel, regularization parameter equal to 1, and kernel coefficient equal to 0.5 is presented, which provided the best results. After balancing the sample, the SVM results improved, but were still inferior to those obtained by random forest. In the best case, the obtained PPV was equal to 0.04 and f1-score equal to 0.06. Among the other two models, better \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Method** & **LDA** & **QDA** & **Logistic Regression** & **Random Forest** & **SVM** \\ \hline Accuracy score & 0.9610 & 0.9266 & 0.9610 & 0.9585 & 0.9604 \\ Confusion matrix & \(\left[\begin{array}{cc}5078&0\\ 209&0\end{array}\right]\) & \(\left[\begin{array}{cc}4894&69\\ 319&5\end{array}\right]\) & \(\left[\begin{array}{cc}5098&0\\ 189&0\end{array}\right]\) & \(\left[\begin{array}{cc}5065&13\\ 206&3\end{array}\right]\) & \(\left[\begin{array}{cc}5065&0\\ 209&0\end{array}\right]\) \\ Sensitivity & 0.00 & 0.02 & 0.00 & 0.01 & 0.00 \\ Specificity & 1.00 & 0.99 & 1.00 & 1.00 & 1.00 \\ Negative predictive value (NPV) & 0.96 & 0.94 & 0.96 & 0.96 & 0.96 \\ Precision (PPV) & 0.00 & 0.07 & 0.00 & 0.19 & 0.00 \\ F1 score & 0.00 & 0.03 & 0.00 & 0.03 & 0.00 \\ Macro average (precision) & 0.48 & 0.50 & 0.48 & 0.57 & 0.48 \\ Weighted average (precision) & 0.92 & 0.89 & 0.93 & 0.93 & 0.92 \\ Macro average (recall) & 0.50 & 0.50 & 0.50 & 0.51 & 0.50 \\ Weighted average (recall) & 0.96 & 0.93 & 0.96 & 0.96 & 0.96 \\ \hline \hline \end{tabular}
\end{table}