small typos again

This commit is contained in:
mhjensen
2018-11-09 06:30:52 +01:00
parent 179d29eecb
commit d26bffa79d
8 changed files with 0 additions and 85 deletions
@@ -509,22 +509,6 @@ plt.show()
!split
===== Playing around with regions =====
!bc pycod
angle = np.pi / 180 * 20
rotation_matrix = np.array([[np.cos(angle), -np.sin(angle)], [np.sin(angle), np.cos(angle)]])
Xr = X.dot(rotation_matrix)
tree_clf_r = DecisionTreeClassifier(random_state=42)
tree_clf_r.fit(Xr, y)
plt.figure(figsize=(8, 3))
plot_decision_boundary(tree_clf_r, Xr, y, axes=[0.5, 7.5, -1.0, 1], iris=False)
plt.show()
!ec
!bc pycod
np.random.seed(6)
Xs = np.random.rand(100, 2) - 0.5
@@ -637,7 +621,6 @@ plt.axis([0, 1, -0.2, 1.1])
plt.xlabel("$x_1$", fontsize=18)
plt.title("min_samples_leaf={}".format(tree_reg2.min_samples_leaf), fontsize=14)
save_fig("tree_regression_regularization_plot")
plt.show()
!ec