Chapter 18

Performing Cross-Validation, Selection, and Optimization

IN THIS CHAPTER

Bullet Learning about overfitting and underfitting

Bullet Choosing the right metric to monitor

Bullet Cross-validating the results

Bullet Selecting the best features for machine learning

Bullet Optimizing hyperparameters

Machine learning algorithms can indeed learn from data. For instance, the four algorithms presented in the previous chapter, although quite simple, can effectively estimate a class or a value after being presented with examples associated with outcomes. It is all a matter of learning by induction, which is the process of extracting general rules from specific examples. From childhood, humans commonly learn by seeing examples, deriving some general rules or ideas from them, and then successfully applying the derived rule to new situations as we grow up. For example, if we see someone being burned after touching fire, we understand that fire is dangerous, and we don’t need to touch it ourselves to know that.

Learning ...

Get Python for Data Science For Dummies, 2nd Edition now with O’Reilly online learning.

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