Skip to content

Commit fa00f07

Browse files
committed
BUG Use threshold obtained from current code
1 parent d535cfc commit fa00f07

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ch02/figure2.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
labels = labels[~is_setosa]
2424
is_virginica = (labels == 'virginica')
2525

26-
# Hand fixed threshold:
27-
t = 1.75
26+
# Hand fixed thresholds:
27+
t = 1.65
28+
t2 = 1.75
2829

2930
# Features to use: 3 & 2
3031
f0, f1 = 3, 2
@@ -49,7 +50,7 @@
4950
ax.fill_between([t, x1], [y0, y0], [y1, y1], color=area2c)
5051
ax.fill_between([x0, t], [y0, y0], [y1, y1], color=area1c)
5152
ax.plot([t, t], [y0, y1], 'k--', lw=2)
52-
ax.plot([t - .1, t - .1], [y0, y1], 'k:', lw=2)
53+
ax.plot([t2, t2], [y0, y1], 'k:', lw=2)
5354
ax.scatter(features[is_virginica, f0],
5455
features[is_virginica, f1], c='b', marker='o', s=40)
5556
ax.scatter(features[~is_virginica, f0],

0 commit comments

Comments
 (0)