C3_W1_KMeans_Assignment # UNQ_C1 # GRADED FUNCTION: find_closest_centroids - are we expected to use the distance/norm or the squared distance/norm?

Hi,
I implemented the function find_cosest_centroids and used:

np.square(np.linalg.norm(x_i - centroid_j)) #correct according to video lectures

the hints show that I should have used the distance/norm and not squared distance:

np.linalg.norm(x_i - centroid_j)

Does it matter?

Thank you,

Aviv

Hi @Aviv_Simionovici

It’s just standard that all assignment follow it, also the test case built according to it so if you implement the assignment you should follow the assignment hints or markdowns, and if you built personal project feel free to choose any of these techniques

Note in the library like sklearn use squared distances function to compute the distance

Cheers,
Abdelrahman