I need to initialize centroid of K-Means using Euclidan distance. Is it possible? If so how the algorithm should be? I have been stuck for a while and couldn't figure it out.

Thanks for your time.


You dont initialize k-means using Euclidean distance. There are a range of initialization methods.

The most intuitive is selecting random instances from your data and initializing there. That way each cluster in your first assignment step has at least one instance. The assignment step is where you apply a distance measure, like euclidean distance.

  • So it is not possible to do this? Just asking – Achid Apr 10 '15 at 9:49
  • What did you want to measure the euclidean distance from? You can place the centroids anywhere so for example you could randomly initialize them a set euclidean distance from the mean of the entire dataset. – michaelb Apr 11 '15 at 2:09
  • It is not my decision to make actually. But if it is cannot be done I will talk to those who do. – Achid Apr 13 '15 at 2:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.