Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using your ols _ model, sgd _ model, and ridge _ model make predictions using your X _ test data and save these predictions as

Using your ols_model, sgd_model, and ridge_model make predictions using your X_test data and save these predictions as ols_pred, sgd_pred, and ridge_pred respectively.
Find the RMSE for each model using Scikit-Learn's mean_squared_error function passing it your y_test and predictions from step 1 above. Round these RMSE scores to 4 decimal places. Save these scores as rmse_ols, rmse_sgd, and rmse_ridge respectively. Hint: Remember that we are asking for RMSE and not MSE. Check Scikit-Learn's documentation for how to calculate the RMSE value.
Find the R-squared values for each model using Scikit-Learn's r2_score function passing it your y_test and predictions from step 1 above. Round these R-squared scores to 4 decimal places. Save these scores as r2_ols, r2_sgd, and r2_ridge respectively.
Print the MSE and R-squared scores for each model.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

What are the different forms of depositary receipt?

Answered: 1 week ago

Question

5. Explain how to install a performance management program.

Answered: 1 week ago