Euclidean Distance

TLDR — a little k-means practice, ended up writing a Euclidean distance function

More

Wanted to play around with k-means following this example — http://mnemstudio.org/clustering-k-means-example-1.htm

I found their naming of the points as 1,2…etc to be a little unclear, so I re-named the points a,b….. I also didn’t like “A” and “B” as the x,y, axis name so I changed that to dim_1, dim_2

Plotting the points on the graph makes it easier to see which ones are furthest away — this seems to actually be a bit of a pain to do in excel. I wonder if there is an easier way.

Next, I was reading and realizing I think I might want to code this to make sure I fully follow the step, so I started with the Euclidean distance function. It returns the correct answer for this example, but I wonder if there is a more elegant way to do this.

Closing Thoughts and Further Questions:

  • This whole thing may be easier in an I-Python Notebook at some point as you could probably change around the Euclidean distance, etc

Excel Shot

Raw Notes