diff --git a/07_ensemble_learning_and_random_forests.ipynb b/07_ensemble_learning_and_random_forests.ipynb index 7558d0f..f8b6789 100644 --- a/07_ensemble_learning_and_random_forests.ipynb +++ b/07_ensemble_learning_and_random_forests.ipynb @@ -496,7 +496,7 @@ "for i in range(15):\n", " tree_clf = DecisionTreeClassifier(max_leaf_nodes=16, random_state=42 + i)\n", " indices_with_replacement = np.random.randint(0, len(X_train), len(X_train))\n", - " tree_clf.fit(X[indices_with_replacement], y[indices_with_replacement])\n", + " tree_clf.fit(X_train[indices_with_replacement], y_train[indices_with_replacement])\n", " plot_decision_boundary(tree_clf, X, y, axes=[-1.5, 2.45, -1, 1.5], alpha=0.02, contour=False)\n", "\n", "plt.show()"