Figure 7. Confusion matrix plot of 5-fold cross-validation results. The dots in the graph are coloured according to the classification results, with blue and red symbols being correct and incorrect classifications, respectively. Sample size for each observation and prediction combination is provided.
2.7 Classification result check
Using the predictions from the behaviour classification model, we can now return to the original ACC data to evaluate which ACC signals lead to correct and incorrect classifications using function plot_confusion_matrix. This function basically uses the same digraph with near identical look to function plot_acc used earlier. The only deviation is that all correct and incorrect predictions (identified using the data frame from function plot_confusion_matrix) are now identified with a solid and a dotted line, respectively, and annotated with labels for the observed and predicted behaviours at the bottom and top of the graph respectively (Fig. 8).