Right now I have this numpy array containing predictions of whether an email is 'spam' or 'ham'. So basically the result of a spam predicting model. I want to compare to a an array containing the classes of test set used. When I use the MultinominalNB.score()
method on them, I get an error because it is meant to compare float values not strings.
So how can I change these two arrays into float values based on whether the list entry was 'spam' or 'ham'? And better still, is there another better method to quantitatively measure the quality of the model?