scikit-learn

scikit-learn is the most popular Python library for doing machine learning. It provides a simple and efficient API with tools for data modeling and data analysis. It is built on top of NumPy, SciPy, and Matplotlib. The following is a screenshot of a Jupyter Notebook:

We do not import the entire library, but instead we import the ones we really need. We need to import the datasets objects. This allows us to load all the datasets that scikit-learn provides.

To understand the concept better, we will use the example of the iris dataset. This runs parallel to the hello world example for any machine learning datasets. The following ...

Get Become a Python Data Analyst 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.