Optimising a Machine Learning Model with the Confusion Matrix