Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge | Multivariate Linear Regression
Explore the Linear Regression Using Python
course content

Contenu du cours

Explore the Linear Regression Using Python

Explore the Linear Regression Using Python

1. What is the Linear Regression?
2. Correlation
3. Building and Training Model
4. Metrics to Evaluate the Model
5. Multivariate Linear Regression

book
Challenge

Tâche

Swipe to start coding

Let’s indicate the number of nonflavanoid phenols based on the number of flavanoids, total phenols and evaluate our model.

Your plan:

  1. [Line #24] Split the data 70-30 (70% of the data is for training and 30% is for testing) and insert 1 as a random parameter.
  2. [Line #25-26] Initialize and fit the model (assign the model to the variable model2).
  3. [Line #30-31] Calculate the MAE and assign the result to the variable MAE.
  4. [Line #34-35] Calculate the R-squared and assign the result to the variable r_squared.
  5. [Line #38] Print the intercept, the MAE and the R-squared in this order and round each value to second digit.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 5. Chapitre 3
toggle bottom row

book
Challenge

Tâche

Swipe to start coding

Let’s indicate the number of nonflavanoid phenols based on the number of flavanoids, total phenols and evaluate our model.

Your plan:

  1. [Line #24] Split the data 70-30 (70% of the data is for training and 30% is for testing) and insert 1 as a random parameter.
  2. [Line #25-26] Initialize and fit the model (assign the model to the variable model2).
  3. [Line #30-31] Calculate the MAE and assign the result to the variable MAE.
  4. [Line #34-35] Calculate the R-squared and assign the result to the variable r_squared.
  5. [Line #38] Print the intercept, the MAE and the R-squared in this order and round each value to second digit.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 5. Chapitre 3
Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
We're sorry to hear that something went wrong. What happened?
some-alt