Question: IN THE PYTHON LANGUAGE AND IN JUPYTER NOTEBOOOK Question 3.4 [8 points] Apply Lasso regression Create a Lasso regression model lasso based on the train

IN THE PYTHON LANGUAGE AND IN JUPYTER NOTEBOOOK
Question 3.4 [8 points] Apply Lasso regression Create a Lasso regression model lasso based on the train set. Use grid search and 10-fold cross-validation to select the best value of alpha. In [ ] In (): Question 3.5 [4 points] Compare the scores of three linear models Test each model by the test sety and get the scores (coefficient of determination R^2 of the prediction). In (): linear_score = reg.score(x_test,y_text) ridge_score = ridge.score(x_text,y_text) #get the score of lasso regression model linear_score, ridge_score In [ ] In ( )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
