You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.7 KiB

W2D01 Piscine AI - Data Science

Alt Text

Linear regression with Scikit Learn

The goal of this day is to understand practical Linear regression and supervised learning.

The word "regression" was introduced by Sir Francis Galton (a cousin of C. Darwin) when he studied the size of individuals within a progeny. He was trying to understand why large individuals in a population appeared to have smaller children, more close to the average population size; hence the introduction of the term "regression".

Today we will learn a basic algorithm used in supervised learning : The Linear Regression. We will be using Scikit-learn which is a machine learning library. It is designed to interoperate with the Python libraries NumPy and Pandas.

We will also learn progressively the Machine Learning methodology for supervised learning - today we will focus on evaluating a machine learning model by splitting the data set in a train set and a test set.

Exercises of the day

  • Exercise 1 Scikit-learn estimator
  • Exercise 2 Linear regression in 1D
  • Exercise 3 Train test split
  • Exercise 4 Forecast diabetes progression
  • Bonus: Exercise 5 Gradient Descent - Optional

Virtual Environment

  • Python 3.x
  • NumPy
  • Pandas
  • Matplotlib
  • Scikit Learn
  • Jupyter or JupyterLab

Version of Scikit Learn I used to do the exercises: 0.22. I suggest to use the most recent one. Scikit Learn 1.0 is finally available after ... 14 years.

Ressources

To start with Scikit-learn

Machine learning methodology and algorithms

Linear Regression

Train test split