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

Course Content

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

bookChallenge

Task

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.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 5. Chapter 3
toggle bottom row

bookChallenge

Task

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.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 5. Chapter 3
toggle bottom row

bookChallenge

Task

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.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Task

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.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 5. Chapter 3
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
some-alt