Update app.py
Browse files
app.py
CHANGED
@@ -17,6 +17,7 @@ def train_and_plot(weights, n_neighbors):
|
|
17 |
y_ = knn.predict(T)
|
18 |
score = knn.score(T, y_)
|
19 |
|
|
|
20 |
plt.scatter(X, y, color="darkorange", label="data")
|
21 |
plt.plot(T, y_, color="navy", label="prediction")
|
22 |
plt.axis("tight")
|
|
|
17 |
y_ = knn.predict(T)
|
18 |
score = knn.score(T, y_)
|
19 |
|
20 |
+
plt.figure()
|
21 |
plt.scatter(X, y, color="darkorange", label="data")
|
22 |
plt.plot(T, y_, color="navy", label="prediction")
|
23 |
plt.axis("tight")
|