update week 39

This commit is contained in:
Morten Hjorth-Jensen
2021-09-28 21:03:20 +02:00
parent b2fb41d199
commit 0a4e451fea
6 changed files with 15 additions and 0 deletions
+3
View File
@@ -139,6 +139,9 @@ print(f"R2 score: {R2(y_test,ypredictRidge)}")
By default the grid search function includes cross validation with five folds. The "Scikit-Learn documentation":"https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" contains more information on how to set the different parameters.
If we take out the random noise, running the above codes results in $\lambda=0$ yielding the best fit.
!split
===== Randomized Grid Search =====