Skip to content

Instantly share code, notes, and snippets.

View tuhinsherlock's full-sized avatar

tuhinsherlock

View GitHub Profile
## 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 = []