Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

knn: fix incorrect label updating in building kdtree#3

Open
anonymouss wants to merge 1 commit intoSmallVagetable:masterSmallVagetable/machine_learning_python:masterfrom
anonymouss:masterCopy head branch name to clipboard
Open

knn: fix incorrect label updating in building kdtree#3
anonymouss wants to merge 1 commit intoSmallVagetable:masterSmallVagetable/machine_learning_python:masterfrom
anonymouss:masterCopy head branch name to clipboard

Conversation

@anonymouss
Copy link

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.