# Machine Learning Methods with Decision Forests for Parkinson's Detection
## 4 Materials and Methods
\begin{table}
\begin{tabular}{l l l} \hline
**INPUT** & & \\ \(M_{D}\) & = & \(n\times m\) data matrix \\ \(F\) & = & Decision Forest Algorithm \{Random Forest \} ForestPA \(|\) SysFor\} \\
**OUTPUT** & & \\ \(TR_{D}\) & = & Ideal Training Set \\ \(TS_{D}\) & = & Ideal Testing Set \\ \(t\) & = & Number of Trees \\ \(P_{A}\) & = & Prediction Accuracy \\
**PROCESS** & & \\
**begin** \\ \end{tabular} & **Step 1.** Initialize training, testing split, number of trees, detection accuracy \\ \(TR_{p}\): = 30, \(TS_{p}\): = 70, \(t\): = 1, \(P_{A}\): = 0.0 \\
**Step 2.** Initialize temporary variables \\ \(TR_{p,temp}\): = 0.0 & //for updating ideal training (\%) split \\ \(TS_{p,temp}\): = 0.0 & //for updating ideal testing (\%) split \\ \(t_{temp}\): = 0 & //for updating lowest number of trees \\ \(P_{A,temp}\): = 0.0 & //for updating highest Accuracy \\
**for \(TR_{p}\): = 30 to 80 & //Check for maximum training size arrival \\
**begin** \\ \end{tabular} \\
**Step 3.** Calculate training \& testing instances and re-initialized number of trees \\ \(TR_{D}\): = \(M_{D}\times\frac{TR_{p}}{100^{7}}\), \(TS_{D}\): = \(M_{D}-TR_{D}\), \(t\) = 1 \\
**for \(t\): = 1 to 100 & //Check for maximum number of tree size arrival \\
**begin** \\ \end{tabular} \\
**Step 4.** Build the decision forest model with \(t\) number of trees \\ \(F_{tm}\): = \(F_{t}(TR_{D})\) \\
**Step 5.** Test the model with test set \(TS_{D}\) and calculate the accuracy \\ \(P_{A}\): = \(F_{tm}(TS_{D})\) \\
**Step 6.** Update accuracy, number of trees, training and testing split (\%) \\
**if \(P_{A}>P_{A,temp}\) than** \\ \(P_{A,temp}\): = \(P_{A}\) & //preserve the highest accuracy \\ \(t_{temp}\): = \(t\) & //preserve the number of trees \\ \(TR_{p,temp}\): = \(TR_{p}\) & //preserve training size \\
**end if** \\ \(t\): = \(t+1\) \\
**end** \\ \(TR_{p}\): = \(TR_{p}+5\) & //increase training size 5\% at a time \\
**end** \\ \(P_{A}\): = \(P_{A,temp}\), \(t\): = \(t_{temp}\), \(TR_{p}\): = \(TR_{p,temp}\), \(TS_{p}\): = \(100-TR_{p}\) \\
**return \(P_{A}\), \(t,TR_{p}\), \(TS_{p}\)** \\ \hline \end{tabular}
\end{table} 
Table 4: The process of decision forests based Parkinson’s detection. The process starts with initially splitting the data as 30% training and 70% testing. It has been observed that there is no clear-cut guideline regarding training and testing instance split. Researchers decide the training testing split according to their implementation environment and convenience [7; 66; 67]. On the other hand, machine learning tools like WEKA states default training testing instance split as 66%-34% [68; 69]. In the absence of a concrete guideline, a loop has been created with training size of 30% and testing size of 70% to training size of 80% and testing size of 20%. In each iteration, the percentage of training size has been incremented by 5%. In each iteration of the training-testing split, the number of trees deployed has been changed from the 1 to a maximum number of trees to 100. This will give us an unbiased analysis of the decision forest for knowing the exact number of trees required to get the highest detection accuracy with the lowest number of errors. However, the main reason for setting the tree limits in the forest up to 100 is that the decision forests have different tree formation limitations. For instance, the SysFor classifier has the default number of trees is 60, whereas the ForestPA decision forest deploys 10 trees by default. Similarly, the Random Forest supports a maximum of 100 decision trees by default [68; 69]. Moreover, according to [PERSON] et al. [33] 100 trees are sufficient in the case of Random Forest for achieving the desired stopping criteria. It should be noted that decision forest like Random Forest randomly selects bootstrap samples for train decision trees. On the other hand, bootstrap sampling is not a cure for small dataset. Therefore, with the increase in training instances, the power of Random Forest increases. This is the reason; we have dynamically increasing the training size from 30% to 80%.