Skip to content

Conversation

Cyntwikip
Copy link

@Cyntwikip Cyntwikip commented Oct 31, 2021

Description

This is my implementation of the k-nearest neighbors machine learning algorithm.

Sample Usage:

clf = KNeighborsClassifier(n_neighbors=3, p=2, n_jobs=-1) # instantiate model
clf.fit(X_train, y_train) # train the model
score = clf.score(X_test, y_test) # does prediction and score evaluation in 1 line
print(f"Test Set Score: {score:.2%}")

Checklist:

  • Code contain Problem statement, examples test cases.
  • My code follows the style guidelines(Clean Code) of this project
  • I have performed a self-review of my own code
  • Explained Detailed approach of Solution
  • I have commented on my code, particularly in hard-to-understand areas
  • Performed Time complexity analysis of the algorithm used in code

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