update week 39
This commit is contained in:
@@ -303,6 +303,9 @@ ypredictRidge = gridsearch.predict(X_test)
|
||||
</pre></div>
|
||||
<p>
|
||||
By default the grid search function includes cross validation with five folds. The <a href="https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" target="_blank">Scikit-Learn documentation</a> contains more information on how to set the different parameters.
|
||||
|
||||
<p>
|
||||
If we take out the random noise, running the above codes results in \( \lambda=0 \) yielding the best fit.
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
@@ -388,6 +388,9 @@ ypredictRidge = gridsearch.predict(X_test)
|
||||
<p>
|
||||
By default the grid search function includes cross validation with five folds. The <a href="https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" target="_blank">Scikit-Learn documentation</a> contains more information on how to set the different parameters.
|
||||
|
||||
<p>
|
||||
If we take out the random noise, running the above codes results in \( \lambda=0 \) yielding the best fit.
|
||||
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
|
||||
@@ -393,6 +393,9 @@ ypredictRidge <span style="color: #666666">=</span> gridsearch<span style="color
|
||||
<p>
|
||||
By default the grid search function includes cross validation with five folds. The <a href="https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html#sklearn.model_selection.GridSearchCV" target="_blank">Scikit-Learn documentation</a> contains more information on how to set the different parameters.
|
||||
|
||||
<p>
|
||||
If we take out the random noise, running the above codes results in \( \lambda=0 \) yielding the best fit.
|
||||
|
||||
<p>
|
||||
<!-- !split --><br><br><br><br><br><br><br><br><br><br>
|
||||
|
||||
|
||||
Binary file not shown.
@@ -176,6 +176,9 @@
|
||||
"source": [
|
||||
"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.\n",
|
||||
"\n",
|
||||
"If we take out the random noise, running the above codes results in $\\lambda=0$ yielding the best fit. \n",
|
||||
"\n",
|
||||
"\n",
|
||||
"## Randomized Grid Search\n",
|
||||
"\n",
|
||||
"An alternative to the above manual grid set up, is to use a random\n",
|
||||
|
||||
@@ -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 =====
|
||||
|
||||
|
||||
Reference in New Issue
Block a user