mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-02-01 12:37:49 +01:00
Versicolor instead of Versicolour
This commit is contained in:
@@ -159,7 +159,7 @@
|
||||
" plt.contour(x1, x2, y_pred, cmap=custom_cmap2, alpha=0.8)\n",
|
||||
" if plot_training:\n",
|
||||
" plt.plot(X[:, 0][y==0], X[:, 1][y==0], \"yo\", label=\"Iris-Setosa\")\n",
|
||||
" plt.plot(X[:, 0][y==1], X[:, 1][y==1], \"bs\", label=\"Iris-Versicolour\")\n",
|
||||
" plt.plot(X[:, 0][y==1], X[:, 1][y==1], \"bs\", label=\"Iris-Versicolor\")\n",
|
||||
" plt.plot(X[:, 0][y==2], X[:, 1][y==2], \"g^\", label=\"Iris-Virginica\")\n",
|
||||
" plt.axis(axes)\n",
|
||||
" if iris:\n",
|
||||
@@ -241,7 +241,7 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"X[(X[:, 1]==X[:, 1][y==1].max()) & (y==1)] # widest Iris-Versicolour flower"
|
||||
"X[(X[:, 1]==X[:, 1][y==1].max()) & (y==1)] # widest Iris-Versicolor flower"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -254,9 +254,9 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"not_widest_versicolour = (X[:, 1]!=1.8) | (y==2)\n",
|
||||
"X_tweaked = X[not_widest_versicolour]\n",
|
||||
"y_tweaked = y[not_widest_versicolour]\n",
|
||||
"not_widest_versicolor = (X[:, 1]!=1.8) | (y==2)\n",
|
||||
"X_tweaked = X[not_widest_versicolor]\n",
|
||||
"y_tweaked = y[not_widest_versicolor]\n",
|
||||
"\n",
|
||||
"tree_clf_tweaked = DecisionTreeClassifier(max_depth=2, random_state=40)\n",
|
||||
"tree_clf_tweaked.fit(X_tweaked, y_tweaked)"
|
||||
|
||||
Reference in New Issue
Block a user