Exercise

  • Can you also tweak the kernel hyperparameter in the newsgroup topic classifier? For example, if you go with RBF kernels, you will also need to tune gamma. Can you achieve higher accuracy?
  • Can you classify the 20 newsgroup dataset using Naïve Bayes? What is the best accuracy you can achieve using grid search and cross-validation?

Get Python Machine Learning By Example - Second Edition now with O’Reilly online learning.

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