Hyperparameter tuning searches for settings that improve a model’s performance. Results from a single initial setting cannot establish an algorithm’s best attainable performance or reliably settle model rankings. section 3.3 section 3.4
Two practical approaches range from intuition-led experiments to systematic searches:
- Manual tuning changes selected settings and evaluates the results. For email and movie-review classification, increasing the maximum tokens per document and maximum token length improved many models’ accuracy, while sometimes changing which model led. section 3.3.1
- Systematic tuning specifies ranges for algorithm-specific settings. GridSearchCV exhaustively tests a parameter grid; HyperOpt performs a random search over parameter ranges. section 3.3.2
A random-forest grid search
For email classification, a GridSearchCV experiment tested three values each for three random-forest parameters: 27 combinations in total. It took less than five minutes and achieved 95.7% accuracy, improving by more than one percentage point over the initial 94.5%. section 3.3.2
Table 3.1 Comparison of algorithm accuracies at different general hyperparameter settings explored during the manual tuning process for the email classification example (view table figure)
Compare email-classification accuracies across three general hyperparameter settings to see how tuning changes model performance. section 3.3.1
Table 3.2 Comparison of algorithm accuracies at different general hyperparameter settings explored during the manual tuning process for the IMDB movie review classification example (view table figure)
Compare movie-review classification accuracies across three general hyperparameter settings. section 3.3.1


















