Skip to content

Commit 94f1554

Browse files
author
bscuser
committed
Add save and load models for knn
1 parent 457bbca commit 94f1554

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_knn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def test_save_load(self):
5959
knn.save_model("./model_KNN")
6060
knn2 = KNeighborsClassifier(n_neighbors=3)
6161
knn2.load_model("./model_KNN")
62-
self.assertTrue(knn2.score(x, y) > 0.8)
62+
self.assertTrue(knn2.score(x, y, collect=True) > 0.8)
6363
# negative points belong to class 1, positives to 0
6464
p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12 = \
6565
[1, 2], [2, 1], [-1, -2], [-2, -1], [1, 2], [2, 1], \

0 commit comments

Comments
 (0)