# Privacy Preserving Classification of EEG Data Using Machine Learning and Homomorphic Encryption
## 3 Results
### Use Case 2--Predisposition to Alcoholism
For the results in Table 5, a voting scheme is applied to determine a single prediction per patient (alcoholic or non-alcoholic): the outputs of all samples corresponding to a patient (which form a time series) are used as input to the voting scheme, where each sample has the same weight. In Table 6, we display the runtime for both inference and training. As in the first use case, the runtime increases when processing encrypted data, but it still remains reasonably small for the inference step. For the same reasons stated in Section 3.2, a similar analysis regarding the influence of the precision parameter was performed also in this use case. The same decreasing tendency in the runtime can be noticed in Table 7, but the minimum number of terms required for zero loss in performance is smaller than in the previous use case. Although the number of operations is larger, the initial precision of the training data is also reflected in the encoding precision. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Plaintext** & **Ciphertext** & **Ciphertext** \\ \hline Training & 0.0286 s & 59.69 h & 32.28 h \\ Inference & 3.46 \(\times\) 10\({}^{-6}\) s & 0.018 s & \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Training and inference runtime comparison between plaintext and ciphertext versions in the EEG-based predisposition to alcoholism detection use case. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline  & \multicolumn{2}{c}{\(E_{1}\)} & \multicolumn{2}{c}{\(E_{2}\)} & \multicolumn{2}{c}{\(E_{3}\)} & \multicolumn{2}{c}{\(E_{4}\)} \\  & **(153,600, 64)** & **(10,000, 64)** & **(153,600, 2145)** & \multicolumn{2}{c}{**(10,000, 128)**} & \\ \cline{2-10}  & **PR** & **SVM** & **PR** & **SVM** & **PR** & **SVM** & **PR** & **PR** & **SVM** \\ \hline Accuracy & 57.34 & 87.46 & 57.27 & 79.33 & 83.92 & 84.27 & 68.52 & 68.52 & 79.08 \\ Sensitivity & 57.26 & 89.06 & 61.20 & 80.15 & 83.81 & 83.97 & 68.45 & 68.45 & 79.22 \\ Specificity & 57.43 & 85.86 & 53.35 & 78.51 & 84.03 & 84.57 & 68.59 & 68.59 & 78.94 \\ PPV & 57.35 & 86.30 & 56.74 & 78.86 & 84.00 & 84.48 & 68.55 & 68.55 & 79.00 \\ NPV & 58.85 & 88.70 & 57.90 & 79.82 & 83.85 & 84.07 & 68.49 & 68.49 & 79.16 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Performance comparison when using different input data configurations in the EEG-based predisposition to alcoholism detection use case. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & \multicolumn{2}{c}{\(E_{1}\)} & \multicolumn{2}{c}{\(E_{2}\)} & \multicolumn{2}{c}{\(E_{3}\)} & \multicolumn{2}{c}{\(E_{4}\)} \\  & **(153,600, 64)** & **(10,000, 64)** & **(153,600, 2145)** & \multicolumn{2}{c}{**(10,000, 128)**} & \\ \cline{2-10}  & **PR** & **SVM** & **PR** & **SVM** & **PR** & **SVM** & **PR** & **PR** & **SVM** \\ \hline Accuracy & 57.34 & 87.46 & 57.27 & 79.33 & 83.92 & 84.27 & 68.52 & 68.52 & 79.08 \\ Sensitivity & 57.26 & 89.06 & 61.20 & 80.15 & 83.81 & 83.97 & 68.45 & 68.45 & 79.22 \\ Specificity & 57.43 & 85.86 & 53.35 & 78.51 & 84.03 & 84.57 & 68.59 & 68.59 & 78.94 \\ PPV & 57.35 & 86.30 & 56.74 & 78.86 & 84.00 & 84.48 & 68.55 & 68.55 & 79.00 \\ NPV & 58.85 & 88.70 & 57.90 & 79.82 & 83.85 & 84.07 & 68.49 & 68.49 & 79.16 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Performance comparison when using different input data configurations in the EEG-based predisposition to alcoholism detection use case after applying the voting scheme.