Applicazioni pratiche di machine learning/Riconoscimento della scrittura a mano: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica
Riga 64:
confusionMatrix(rf.pred,as.factor(test_p$label))
</syntaxhighlight>
 
Confusion Matrix and Statistics
 
Reference
Prediction 0 1 2 3 4 5 6 7 8 9
0 2871 0 1 1 0 2 2 0 1 2
1 0 3286 1 0 0 1 0 0 1 0
2 0 0 2931 2 0 1 0 2 1 0
3 0 0 0 3019 0 4 0 0 4 3
4 0 0 1 0 2863 1 0 2 2 5
5 0 0 0 1 0 2690 0 0 4 0
6 0 0 2 1 1 0 2864 0 0 0
7 0 0 0 0 1 0 0 3063 0 1
8 0 0 2 0 1 0 0 0 2834 1
9 0 1 0 0 7 0 0 2 0 2917
 
Overall Statistics
Accuracy : 0.9978
95% CI : (0.9972, 0.9983)
No Information Rate : 0.1118
P-Value [Acc > NIR] : < 2.2e-16
Kappa : 0.9975
Mcnemar's Test P-Value : NA
 
Statistics by Class:
 
Class: 0 Class: 1 Class: 2 Class: 3 Class: 4 Class: 5
Sensitivity 1.00000 0.9997 0.99762 0.9983 0.99652 0.99667
Specificity 0.99966 0.9999 0.99977 0.9996 0.99959 0.99981
Pos Pred Value 0.99687 0.9991 0.99796 0.9964 0.99617 0.99814
Neg Pred Value 1.00000 1.0000 0.99974 0.9998 0.99962 0.99966
Prevalence 0.09764 0.1118 0.09992 0.1028 0.09771 0.09179
Detection Rate 0.09764 0.1118 0.09968 0.1027 0.09737 0.09149
Detection Prevalence 0.09795 0.1119 0.09989 0.1031 0.09775 0.09166
Balanced Accuracy 0.99983 0.9998 0.99870 0.9990 0.99805 0.99824
Class: 6 Class: 7 Class: 8 Class: 9
Sensitivity 0.99930 0.9980 0.99543 0.99590
Specificity 0.99985 0.9999 0.99985 0.99962
Pos Pred Value 0.99861 0.9993 0.99859 0.99658
Neg Pred Value 0.99992 0.9998 0.99951 0.99955
Prevalence 0.09747 0.1044 0.09683 0.09962
Detection Rate 0.09741 0.1042 0.09638 0.09921
Detection Prevalence 0.09754 0.1042 0.09652 0.09955
Balanced Accuracy 0.99958 0.9990 0.99764 0.99776
 
Confusion Matrix and Statistics
 
Reference
Prediction 0 1 2 3 4 5 6 7 8 9
0 1212 0 8 5 1 18 12 2 4 4
1 0 1366 3 2 6 4 1 9 8 2
2 7 3 1145 26 10 4 12 24 17 4
3 2 7 11 1179 2 36 4 6 44 28
4 2 3 11 3 1071 9 5 14 9 85
5 9 3 7 44 5 971 12 15 48 12
6 16 1 9 4 16 10 1220 0 9 3
7 4 3 22 15 10 5 0 1234 10 52
8 6 5 20 36 10 24 5 6 1047 15
9 3 6 3 13 68 15 0 22 20 1054
 
Overall Statistics
Accuracy : 0.9128
95% CI : (0.9078, 0.9177)
No Information Rate : 0.1109
P-Value [Acc > NIR] : < 2.2e-16
Kappa : 0.9031
Mcnemar's Test P-Value : NA
 
Statistics by Class:
 
Class: 0 Class: 1 Class: 2 Class: 3 Class: 4 Class: 5
Sensitivity 0.96114 0.9778 0.92413 0.88847 0.89324 0.88595
Specificity 0.99524 0.9969 0.99058 0.98758 0.98763 0.98652
Pos Pred Value 0.95735 0.9750 0.91454 0.89386 0.88366 0.86234
Neg Pred Value 0.99568 0.9972 0.99171 0.98688 0.98876 0.98910
Prevalence 0.10010 0.1109 0.09836 0.10534 0.09518 0.08700
Detection Rate 0.09621 0.1084 0.09089 0.09359 0.08502 0.07708
Detection Prevalence 0.10050 0.1112 0.09939 0.10471 0.09621 0.08939
Balanced Accuracy 0.97819 0.9873 0.95736 0.93802 0.94044 0.93624
Class: 6 Class: 7 Class: 8 Class: 9
Sensitivity 0.95987 0.92643 0.86102 0.83717
Specificity 0.99400 0.98926 0.98884 0.98677
Pos Pred Value 0.94720 0.91070 0.89182 0.87542
Neg Pred Value 0.99549 0.99128 0.98521 0.98201
Prevalence 0.10090 0.10574 0.09653 0.09994
Detection Rate 0.09685 0.09796 0.08312 0.08367
Detection Prevalence 0.10225 0.10757 0.09320 0.09558
Balanced Accuracy 0.97694 0.95784 0.92493 0.91197