Testing the baseline model

Here, we will look at the code snippet that performs the actual testing. We will be obtaining all the testing matrices that have been explained so far. We are going to test all the different ML algorithms so that we can compare the accuracy score.

Testing of Multinomial naive Bayes

You can see the testing result for the multinomial naive Bayes algorithm in the following figure:

Testing of Multinomial naive Bayes

Figure 5.9: Code snippet for testing multinomial naive Bayes algorithm

As you can see, using this algorithm we have achieved an accuracy score of 81.5%.

Testing of SVM with rbf kernel

You can see the testing result for SVM with the rbf kernel algorithm ...

Get Machine Learning Solutions now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.