⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@Dcyaprogrammer
Copy link
Contributor

Pull Request Template

Description

Implement K-Nearest Neighbors classification algorithm in machine learning

It is a well-known, widely-used and basic classification algorithm that classifies
a data point based on the majority class of its k nearest neighbors.

Related tests ran successfully

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • ✅ I ran bellow commands using the latest version of rust nightly.
  • ✅ I ran cargo clippy --all -- -D warnings just before my last commit and fixed any issue that was found.
  • ✅ I ran cargo fmt just before my last commit.
  • ✅ I ran cargo test just before my last commit and all tests passed.
  • ✅ I added my algorithm to the corresponding mod.rs file within its own folder, and in any parent folder(s).
  • ✅ I added my algorithm to DIRECTORY.md with the correct link.
  • ✅ I checked COUNTRIBUTING.md and my code follows its guidelines.

@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.96%. Comparing base (b705fd7) to head (d33dadb).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #993      +/-   ##
==========================================
+ Coverage   95.94%   95.96%   +0.01%     
==========================================
  Files         363      364       +1     
  Lines       24721    24810      +89     
==========================================
+ Hits        23719    23809      +90     
+ Misses       1002     1001       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Dcyaprogrammer
Copy link
Contributor Author

Hi @siriak, would you please take a look to your convenience. I believe this is ready to be merged. Thank you!

Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@siriak siriak merged commit 47ea8bd into TheAlgorithms:master Jan 13, 2026
7 checks passed
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.

3 participants