Is a non parametric machine learning algorithm. Fix & Hodges proposed K-nearest neighbor classifier algorithm in the year of 1951 for performing pattern classification task.
KNN - Classification - Supervised - Labeled data
A more detailed explanation could be found on this link: https://towardsdatascience.com/machine-learning-basics-with-the-k-nearest-neighbors-algorithm-6a6e71d01761
The yeast dataset. This dataset contains some biological data whose purpose I do not understand myself.
- 1000 training objects.
- 484 test objects.
- 8 dimensions.
- 10 classes.
Data set link : http://vlm1.uta.edu/~athitsos/courses/cse4309_fall2020/assignments/uci_datasets/
load_csv
function to load data from the file
euclidean_distance
function to calculate the eclidean distance between each two point
get_neighbors
function to get the most nearst negihbors
predict_classification
function to make the prediction according to the neighbros
accuracy
function to calculate the accuracy percentage and number of correct predictions
KNN
function to build the KNN model