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 your model

Bullet Optimizing hyperparameters

This chapter is about how machine learning algorithms learn, and it explores some methods for making them learn better. Machine learning algorithms can indeed learn from data. For instance, the four algorithms presented in the previous chapter, although not complex, 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 ...

Get Python for Data Science For Dummies, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.