Testing and validating

After loading our data, preprocessing it, creating new useful features, checking for outliers and other inconsistent data points, and choosing the right metric, we are finally ready to apply some machine learning algorithm that, by observing a series of examples and pairing them with their outcome, is able to extract a series of rules that can be successfully generalized to new examples by correctly guessing their resulting outcome. This is the supervised learning approach where a series of specialized algorithms that are fundamental to data science is used. How can we correctly apply the learning process in order to achieve the best generalizable model for prediction?

There are some best practices to be followed. Let's proceed ...

Get Python Data Science Essentials 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.