The function returns a success message and creates 3 output tables.
message |
---|
Success ! The result has been outputted to tables: "confusionmatrix_output_1", "confusionmatrix_output_2" and "confusionmatrix_output_3" |
The query below returns the output shown in the following table:
SELECT * FROM confusionmatrix_output_1 ORDER BY 1;
Three output tables are created by the function query. The following output table provides the confusion matrix (also known as contingency table):
observation/predict | setosa | versicolor | virginica |
---|---|---|---|
setosa | 10 | 0 | 0 |
versicolor | 0 | 9 | 3 |
virginica | 0 | 1 | 7 |
The query below returns the output shown in the following table:
SELECT * FROM confusionmatrix_output_2 ORDER BY 1;
The following table contains statistical values:
key | value |
---|---|
95% CI | (0.6928, 0.9624) |
Accuracy | 0.8667 |
Kappa | 0.8 |
Mcnemar Test P-Value | NA |
Null Error Rate | 0.4 |
P-Value [Acc > NIR] | 0 |
The query below returns the output shown in the following table:
SELECT * FROM confusionmatrix_output_3 ORDER BY 1;
The following table contains accuracy/error measures like sensitivity and specificity for each class.
measure | virginica | setosa | versicolor |
---|---|---|---|
Balanced Accuracy | 0.8693 | 1 | 0.8472 |
Detection Prevalence | 0.3333 | 0.3333 | 0.3333 |
Detection Rate | 0.2333 | 0.3333 | 0.3 |
Neg Pred Value | 0.95 | 1 | 0.85 |
Pos Pred Value | 0.7 | 1 | 0.9 |
Prevalence | 0.2667 | 0.3333 | 0.4 |
Sensitivity | 0.875 | 1 | 0.75 |
Specificity | 0.8636 | 1 | 0.9444 |