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

Contenido del Curso

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

Challenge

Let’s combine our knowledge!

Tarea

In this task, you build, train and fit your model and make predictions based on it. This time you will make predictions about total_phenols, based on flavanoids. It means that your target now is total_phenols.

Your plan:

  1. [Line #18] Define the target (in this task it's total_phenols).
  2. [Line #25] Split the data 70-30 (70% of the data is for training and 30% is for testing) and insert 1 as a random parameter.
  3. [Line #26] Initialize linear regression model .
  4. [Line #27] Fit the model using your tain data.
  5. [Line #30] Assign np.array() to the variable new_flavanoids if their number is 1 (don't forget to use function .reshape(-1,1)).
  6. [Line #31] Predict and assign the amount of flavanoids to the variable predicted_value.
  7. [Line #32] Print the predicted amount of flavanoids.

Tarea

In this task, you build, train and fit your model and make predictions based on it. This time you will make predictions about total_phenols, based on flavanoids. It means that your target now is total_phenols.

Your plan:

  1. [Line #18] Define the target (in this task it's total_phenols).
  2. [Line #25] Split the data 70-30 (70% of the data is for training and 30% is for testing) and insert 1 as a random parameter.
  3. [Line #26] Initialize linear regression model .
  4. [Line #27] Fit the model using your tain data.
  5. [Line #30] Assign np.array() to the variable new_flavanoids if their number is 1 (don't forget to use function .reshape(-1,1)).
  6. [Line #31] Predict and assign the amount of flavanoids to the variable predicted_value.
  7. [Line #32] Print the predicted amount of flavanoids.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Sección 3. Capítulo 4
toggle bottom row

Challenge

Let’s combine our knowledge!

Tarea

In this task, you build, train and fit your model and make predictions based on it. This time you will make predictions about total_phenols, based on flavanoids. It means that your target now is total_phenols.

Your plan:

  1. [Line #18] Define the target (in this task it's total_phenols).
  2. [Line #25] Split the data 70-30 (70% of the data is for training and 30% is for testing) and insert 1 as a random parameter.
  3. [Line #26] Initialize linear regression model .
  4. [Line #27] Fit the model using your tain data.
  5. [Line #30] Assign np.array() to the variable new_flavanoids if their number is 1 (don't forget to use function .reshape(-1,1)).
  6. [Line #31] Predict and assign the amount of flavanoids to the variable predicted_value.
  7. [Line #32] Print the predicted amount of flavanoids.

Tarea

In this task, you build, train and fit your model and make predictions based on it. This time you will make predictions about total_phenols, based on flavanoids. It means that your target now is total_phenols.

Your plan:

  1. [Line #18] Define the target (in this task it's total_phenols).
  2. [Line #25] Split the data 70-30 (70% of the data is for training and 30% is for testing) and insert 1 as a random parameter.
  3. [Line #26] Initialize linear regression model .
  4. [Line #27] Fit the model using your tain data.
  5. [Line #30] Assign np.array() to the variable new_flavanoids if their number is 1 (don't forget to use function .reshape(-1,1)).
  6. [Line #31] Predict and assign the amount of flavanoids to the variable predicted_value.
  7. [Line #32] Print the predicted amount of flavanoids.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Sección 3. Capítulo 4
toggle bottom row

Challenge

Let’s combine our knowledge!

Tarea

In this task, you build, train and fit your model and make predictions based on it. This time you will make predictions about total_phenols, based on flavanoids. It means that your target now is total_phenols.

Your plan:

  1. [Line #18] Define the target (in this task it's total_phenols).
  2. [Line #25] Split the data 70-30 (70% of the data is for training and 30% is for testing) and insert 1 as a random parameter.
  3. [Line #26] Initialize linear regression model .
  4. [Line #27] Fit the model using your tain data.
  5. [Line #30] Assign np.array() to the variable new_flavanoids if their number is 1 (don't forget to use function .reshape(-1,1)).
  6. [Line #31] Predict and assign the amount of flavanoids to the variable predicted_value.
  7. [Line #32] Print the predicted amount of flavanoids.

Tarea

In this task, you build, train and fit your model and make predictions based on it. This time you will make predictions about total_phenols, based on flavanoids. It means that your target now is total_phenols.

Your plan:

  1. [Line #18] Define the target (in this task it's total_phenols).
  2. [Line #25] Split the data 70-30 (70% of the data is for training and 30% is for testing) and insert 1 as a random parameter.
  3. [Line #26] Initialize linear regression model .
  4. [Line #27] Fit the model using your tain data.
  5. [Line #30] Assign np.array() to the variable new_flavanoids if their number is 1 (don't forget to use function .reshape(-1,1)).
  6. [Line #31] Predict and assign the amount of flavanoids to the variable predicted_value.
  7. [Line #32] Print the predicted amount of flavanoids.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Let’s combine our knowledge!

Tarea

In this task, you build, train and fit your model and make predictions based on it. This time you will make predictions about total_phenols, based on flavanoids. It means that your target now is total_phenols.

Your plan:

  1. [Line #18] Define the target (in this task it's total_phenols).
  2. [Line #25] Split the data 70-30 (70% of the data is for training and 30% is for testing) and insert 1 as a random parameter.
  3. [Line #26] Initialize linear regression model .
  4. [Line #27] Fit the model using your tain data.
  5. [Line #30] Assign np.array() to the variable new_flavanoids if their number is 1 (don't forget to use function .reshape(-1,1)).
  6. [Line #31] Predict and assign the amount of flavanoids to the variable predicted_value.
  7. [Line #32] Print the predicted amount of flavanoids.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 3. Capítulo 4
Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
We're sorry to hear that something went wrong. What happened?
some-alt