Remove redundant comment

This commit is contained in:
Aurélien Geron
2021-12-08 15:16:42 +13:00
parent 146e6fc062
commit 3552690321
6 changed files with 25 additions and 32 deletions

View File

@@ -91,8 +91,8 @@
"plt.rc('font', size=14)\n",
"plt.rc('axes', labelsize=14, titlesize=14)\n",
"plt.rc('legend', fontsize=14)\n",
"plt.rc('xtick',labelsize=10)\n",
"plt.rc('ytick',labelsize=10)"
"plt.rc('xtick', labelsize=10)\n",
"plt.rc('ytick', labelsize=10)"
]
},
{
@@ -144,7 +144,7 @@
"cumulative_heads = coin_tosses.cumsum(axis=0)\n",
"cumulative_heads_ratio = cumulative_heads / np.arange(1, 10001).reshape(-1, 1)\n",
"\n",
"plt.figure(figsize=(8,3.5))\n",
"plt.figure(figsize=(8, 3.5))\n",
"plt.plot(cumulative_heads_ratio)\n",
"plt.plot([0, 10000], [0.51, 0.51], \"k--\", linewidth=2, label=\"51%\")\n",
"plt.plot([0, 10000], [0.5, 0.5], \"k-\", label=\"50%\")\n",
@@ -484,7 +484,7 @@
"\n",
"m = len(X_train)\n",
"\n",
"fix, axes = plt.subplots(ncols=2, figsize=(10,4), sharey=True)\n",
"fix, axes = plt.subplots(ncols=2, figsize=(10, 4), sharey=True)\n",
"for subplot, learning_rate in ((0, 1), (1, 0.5)):\n",
" sample_weights = np.ones(m) / m\n",
" plt.sca(axes[subplot])\n",
@@ -628,7 +628,7 @@
" plt.legend(loc=\"upper center\")\n",
" plt.axis(axes)\n",
"\n",
"plt.figure(figsize=(11,11))\n",
"plt.figure(figsize=(11, 11))\n",
"\n",
"plt.subplot(3, 2, 1)\n",
"plot_predictions([tree_reg1], X, y, axes=[-0.5, 0.5, -0.2, 0.8], style=\"g-\",\n",
@@ -717,7 +717,7 @@
"source": [
"# not in the book this cell generates and saves Figure 710\n",
"\n",
"fix, axes = plt.subplots(ncols=2, figsize=(10,4), sharey=True)\n",
"fix, axes = plt.subplots(ncols=2, figsize=(10, 4), sharey=True)\n",
"\n",
"plt.sca(axes[0])\n",
"plot_predictions([gbrt], X, y, axes=[-0.5, 0.5, -0.1, 0.8], style=\"r-\",\n",