Chapter 18

Performing Cross-Validation, Selection, and Optimization

In This Chapter

arrow Learning about overfitting and underfitting

arrow Choosing the right metric to monitor

arrow Cross-validating our results

arrow Selecting the best features for machine-learning

arrow 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 exemplifications. 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. ...

Get Python for Data Science For Dummies 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.