This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## K NEAREST NEIGHBOUR MACHINE LEARNING ALGORITHM ON PYTHON ## | |
def train(X_train, y_train): | |
# do nothing | |
return | |
def predict(X_train, y_train, x_test, k): | |
# create list for distances and targets | |
distances = [] | |
targets = [] |