Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Follow the Jupyter notebook for Ridge / Lasso regression. After completing the following statement, enter the value of the TRAINING set accuracy ( to 2

Follow the Jupyter notebook for Ridge/Lasso regression. After completing the following statement, enter the value of the TRAINING set accuracy (to 2 decimal places) as a number between 0 and 1(i.e., do NOT enter accuracy as a percentage between 0 and 100)::
# Now fit a Ridge regression
from sklearn.linear_model import Ridge
ridge = Ridge().fit(X_train, y_train)
print("Training set score: {:.2f}".format(ridge.score(X_train,y_train)))
print("Test set score: {:.2f}".format(ridge.score(X_test,y_test)))

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

More Books

Students also viewed these General Management questions