def computeAccuracy(X,Y,X_test,Y_test) :
m = X_test.shape[0]
# print(m)
accurate = 0
for i in range(m) :
pred = knn(X_train,Y_train,X_test[i])
if(int(pred) == Y_test[i]) :
accurate += 1
print('Accuracy = ',(accurate*100)/m)
computeAccuracy(X_train,Y_train,X_test,Y_test)
Sir , It’s keep running for more than 15 mins and doesn’t giving Output . Please check if it is right or not?