Update 2_6_Model_Tuning.ipynb

Fixed typo.
pull/6/merge
Carlos A. Iglesias 2 years ago committed by GitHub
parent 11a1ea80d3
commit a7c6be5b96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -314,7 +314,7 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"Changing manually the hyperparameters to find their optimal values is not practical. Instead, we can consider to find the optimal value of the parameters as an *optimization problem*. \n", "Changing manually the hyperparameters to find their optimal values is not practical. Instead, we can consider to find the optimal value of the hyperparameters as an *optimization problem*. \n",
"\n", "\n",
"The sklearn comes with several optimization techniques for this purpose, such as **grid search** and **randomized search**. In this notebook we are going to introduce the former one." "The sklearn comes with several optimization techniques for this purpose, such as **grid search** and **randomized search**. In this notebook we are going to introduce the former one."
] ]
@ -323,7 +323,7 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"The sklearn provides an object that, given data, computes the score during the fit of an estimator on a parameter grid and chooses the parameters to maximize the cross-validation score. " "The sklearn provides an object that, given data, computes the score during the fit of an estimator on a hyperparameter grid and chooses the hyperparameters to maximize the cross-validation score. "
] ]
}, },
{ {
@ -371,7 +371,7 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"We can now evaluate the KFold with this optimized parameter as follows." "We can now evaluate the KFold with this optimized hyperparameter as follows."
] ]
}, },
{ {
@ -431,7 +431,7 @@
"scores = ['precision', 'recall']\n", "scores = ['precision', 'recall']\n",
"\n", "\n",
"for score in scores:\n", "for score in scores:\n",
" print(\"# Tuning hyper-hyperparameters for %s\" % score)\n", " print(\"# Tuning hyperparameters for %s\" % score)\n",
" print()\n", " print()\n",
"\n", "\n",
" if score == 'precision':\n", " if score == 'precision':\n",

Loading…
Cancel
Save