Skip to content

Instantly share code, notes, and snippets.

@vivekpadia70
Created December 25, 2019 06:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vivekpadia70/e1348dc2f95ac234f249c219ab86deb8 to your computer and use it in GitHub Desktop.
Save vivekpadia70/e1348dc2f95ac234f249c219ab86deb8 to your computer and use it in GitHub Desktop.
knr = KNeighborsRegressor(weights='distance', n_neighbors=200)
knr.fit(X_train, Y_train)
print("KNN Score: ", knr.score(X_train, Y_train))
print("KNN Test Score: ", knr.score(X_test, Y_test))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment