Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ k_nearest_neighbours.py
File
k_nearest_neighbours.py
machine_learning/k_nearest_neighbours.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
""
"
2
k-Nearest Neighbours (kNN) is a simple non-parametric supervised learning
3
algorithm used
for
classification. Given some labelled training data, a given
4
point is classified using its k nearest neighbours according to some distance
Callers
nothing calls this directly
Calls
2
KNN
Class · 0.85
classify
Method · 0.80
Tested by
no test coverage detected