# Viability of ABO Blood Typing with ATR-FTIR Spectroscopy
## 3 Results and Discussion
### Naive Bayesian Classifier  
Naive Bayesian Classifier (NBC) assigns a class to an unknown object based on the Bayes' Probability Theorem. It is, therefore, necessary to know the probability of every variable (\(\mathrm{v_{i}}\)), taking a certain value when the sample belongs to a class \(\mathrm{C_{j}}\) (that is \(\mathrm{P(v_{i}/C_{j})}\)), and the probability of belonging to that class as well (\(\mathrm{pC_{j}}\)). \(\mathrm{P(v_{i}/C_{j})}\) is estimated from a training dataset randomly selected among the whole dataset. The probability of every class was obtained from the number of samples of every class in the training dataset, using as variables the peak area described in Table 2. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline  & \multicolumn{4}{c}{**LDA Classification**} & \multicolumn{4}{c}{**Random Classification**} \\ \hline  & \multicolumn{4}{c}{**Assigned Class**} & \multicolumn{4}{c}{**Assigned Class**} \\ \hline  & & A & B & AB & 0 & & A & B & AB & 0 \\ \cline{2-10}  & A & 6\% & \textless{}1\% & 2\% & 7\% & & A & 5\% & 9\% & 3\% & 6\% \\ \cline{2-10}  & B & 6\% & 26\% & 9\% & 4\% & & B & 9\% & 15\% & 5\% & 10\% \\ \cline{2-10}  & AB & 2\% & 6\% & 6\% & 0\% & & AB & 3\% & 5\% & 2\% & 3\% \\ \cline{2-10}  & 0 & 15\% & 0\% & 3\% & 10\% & & 0 & 6\% & 10\% & 3\% & 7\% \\ \hline  & \multicolumn{4}{c}{T+} & \multicolumn{4}{c}{T-} & \multicolumn{4}{c}{F+} & \multicolumn{4}{c}{F-} \\ \hline A-type success rate & \(\downarrow\) 6.1\% & \(\uparrow\) 62.1\% & \(\downarrow\) 22.2\% & & \(\uparrow\) 9.6\% & \\ \hline B-type success rate & \(\searrow\) 25.8\% & \(\
earrow\) 50.0\% & \(\uparrow\) 6.1\% & \(\downarrow\) 18.2\% & \\ \hline AB-type success rate & \(\downarrow\) 6.1\% & \(\uparrow\) 73.2\% & \(\
earrow\) 13.6\% & \(\downarrow\) 7.1\% & \\ \hline
0-type success rate & \(\downarrow\) 9.6\% & \(\uparrow\) 62.1\% & \(\
earrow\) 10.6\% & \(\searrow\) 17.7\% & \\ \hline Average success rate & \(\downarrow\) 11.9\% & \(\uparrow\) 61.9\% & \(\
earrow\) 13.1\% & \(\
earrow\) 13.1\% \\ \hline \multicolumn{4}{c}{LDA classification} & \multicolumn{4}{c}{Random classification} \\ \hline  & \multicolumn{4}{c}{Assigned class} & \multicolumn{4}{c}{Assigned class} \\ \hline  & \multicolumn{4}{c}{A} & \multicolumn{1}{c}{B} & \multicolumn{1}{c}{0} & \multirow{2}{*}{
\begin{tabular}{c} A \\ \end{tabular} } & \multicolumn{1}{c}{B} & \multicolumn{1}{c}{0} \\ \cline{2-10}  & A & 10\% & 2\% & 13\% & & A & 6\% & 11\% & 7\% \\ \cline{2-10}  & B & 3\% & 37\% & 4\% & & B & 11\% & 23\% & 14\% \\ \cline{2-10}  & 0 & 15\% & 1\% & 16\% & & 0 & 7\% & 14\% & 9\% \\ \hline  & \multicolumn{4}{c}{T+} & \multicolumn{4}{c}{T-} & \multicolumn{4}{c}{F+} & \multicolumn{4}{c}{F-} \\ \hline A-type success rate & \(\downarrow\) 9.8\% & \(\uparrow\) 58.0\% & \(\downarrow\) 17.8\% & \(\downarrow\) 14.4\% \\ \hline B-type success rate & \(\
earrow\) 36.8\% & \(\uparrow\) 53.4\% & \(\uparrow\) 2.9\% & \(\
earrow\) 6.9\% \\ \hline
0-type success rate & \(\downarrow\) 16.1\% & \(\uparrow\) 51.1\% & \(\downarrow\) 16.7\% & \(\downarrow\) 16.1\% \\ \hline Average success rate & \(\downarrow\) 20.9\% & \(\uparrow\) 54.2\% & \(\searrow\) 12.5\% & \(\searrow\) 12.5\% \\ \hline \end{tabular}
\end{table} 
Table 4: Training and test dataset confusion matrixes for LDA and success rates. An NBC model was tested using six different randomly selected training and test datasets in the same proportion as in the LDA case. As can be seen in Table 5, the model has a higher success ratio than the random classification (\(p<0.01\)), and provides a better true positive ratio than LDA for the A, B, and AB samples, but not for O. As in the case of LDA, the presence of both A and B antigens in the AB type may cause difficulties in the classification. Thus, initially, we performed the classification without the AB type samples, again using six different training and test datasets.