Зміст курсу
Explore the Linear Regression Using Python
Explore the Linear Regression Using Python
Challenge
Let’s combine our knowledge!
Завдання
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:
- [Line #18] Define the target (in this task it's
total_phenols
). - [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. - [Line #26] Initialize linear regression model .
- [Line #27] Fit the model using your tain data.
- [Line #30] Assign
np.array()
to the variablenew_flavanoids
if their number is1
(don't forget to use function.reshape(-1,1)
). - [Line #31] Predict and assign the amount of flavanoids to the variable
predicted_value
. - [Line #32] Print the predicted amount of flavanoids.
Дякуємо за ваш відгук!
Challenge
Let’s combine our knowledge!
Завдання
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:
- [Line #18] Define the target (in this task it's
total_phenols
). - [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. - [Line #26] Initialize linear regression model .
- [Line #27] Fit the model using your tain data.
- [Line #30] Assign
np.array()
to the variablenew_flavanoids
if their number is1
(don't forget to use function.reshape(-1,1)
). - [Line #31] Predict and assign the amount of flavanoids to the variable
predicted_value
. - [Line #32] Print the predicted amount of flavanoids.
Дякуємо за ваш відгук!
Challenge
Let’s combine our knowledge!
Завдання
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:
- [Line #18] Define the target (in this task it's
total_phenols
). - [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. - [Line #26] Initialize linear regression model .
- [Line #27] Fit the model using your tain data.
- [Line #30] Assign
np.array()
to the variablenew_flavanoids
if their number is1
(don't forget to use function.reshape(-1,1)
). - [Line #31] Predict and assign the amount of flavanoids to the variable
predicted_value
. - [Line #32] Print the predicted amount of flavanoids.
Дякуємо за ваш відгук!
Let’s combine our knowledge!
Завдання
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:
- [Line #18] Define the target (in this task it's
total_phenols
). - [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. - [Line #26] Initialize linear regression model .
- [Line #27] Fit the model using your tain data.
- [Line #30] Assign
np.array()
to the variablenew_flavanoids
if their number is1
(don't forget to use function.reshape(-1,1)
). - [Line #31] Predict and assign the amount of flavanoids to the variable
predicted_value
. - [Line #32] Print the predicted amount of flavanoids.