K - Nearest Neighbours

why it is said that In KNN, No training is done , we are giving data to the algorithm before testing , so how can u say this??

Hello Shalini,
While implementing KNN, we pass the entire training set along with a particular testing point and the KNN model returns one prediction value corresponding to that testing point. What happens inside the KNN model is independent of what the model has seen before. Simply the distances between the testing point and all the training points are being calculated and the nearest ‘k’ points are being used to bring about the final prediction.

Thus, no real training (which refers to the model ‘learning’ something from the data it has seen) is happening in KNN.

I hope this clears your doubt.