background image

65 

 

Table 25: knn on binary training set 

 

precision  recall  f1-score  support 

abnormal 

0.99 

0.99 

0.99 

58450 

normal 

1.00 

0.99 

0.99 

67523 

 

 

 

 

 

accuracy 

 

 

0.99 

125973 

macro avg 

0.99 

0.99 

0.99 

125973 

weighted avg  0.99 

0.99 

0.99 

125973 

 

Table 26: knn on binary test set (validation) 

 

precision  recall  f1-score  support 

abnormal 

0.66 

0.92 

0.77 

9182 

normal 

0.93 

0.67 

0.78 

13362 

 

 

 

 

 

accuracy 

 

 

0.77 

22544 

macro avg 

0.79 

0.80 

0.77 

22544 

weighted avg  0.82 

0.77 

0.77 

22544 

 

Table 27: knn on 4-class training set 

 

precision  recall  f1-score  support 

DoS 

1.00 

0.99 

1.00 

46282 

Probe 

0.96 

0.99 

0.98 

11296 

R2L 

0.93 

0.94 

0.93 

984 

U2R 

0.38 

0.69 

0.49 

29 

normal 

1.00 

1.00 

1.00 

67382 

 

 

 

 

 

accuracy 

 

 

0.99 

125973 

macro avg 

0.85 

0.92 

0.88 

125973 

weighted avg  0.99 

0.99 

0.99 

125973 

 

Table 28: knn on 4-class test set (validation) 

 

precision  recall  f1-score  support 

DoS 

0.83 

0.89 

0.86 

6900 

Probe 

0.53 

0.66 

0.59 

1962 

R2L 

0.04 

0.90 

0.07 

114 

U2R 

0.27 

0.64 

0.38 

28 

normal 

0.93 

0.66 

0.77 

13540 

 

 

 

 

 

accuracy 

 

 

0.74 

22544 

macro avg 

0.52 

0.75 

0.53 

22544 

weighted avg  0.86 

0.74 

0.78 

22544