Skip to content

knn: fix incorrect label updating in building kdtree#3

Open
anonymouss wants to merge 1 commit intoSmallVagetable:masterfrom
anonymouss:master
Open

knn: fix incorrect label updating in building kdtree#3
anonymouss wants to merge 1 commit intoSmallVagetable:masterfrom
anonymouss:master

Conversation

@anonymouss
Copy link
Copy Markdown

Fix issue #2

Test Result:

iris = load_iris()
iris_data = iris.data
iris_label = iris.target
X_train, X_test, y_train, y_test = train_test_split(iris_data, iris_label, test_size=0.2)
model = KNNKdTree()
model.fit(X_train, y_train)
model.score(X_test, y_test)

Out[8]: 0.9666666666666667

Change-Id: I74740ae3ad13c2aede8e752e7dfbf2ece0d1bbc1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant