Skip to content

Instantly share code, notes, and snippets.

View liu6tot's full-sized avatar
🏠
Working from home

liu6tot liu6tot

🏠
Working from home
  • lnu
  • sy,ln,china
View GitHub Profile
@liu6tot
liu6tot / K-Means.py
Created January 28, 2019 11:56 — forked from pmsosa/K-Means.py
K-Means Clustering Implementation
##############################################################################################
### K-Means Python Implementation ###
### http://konukoii.com/blog/2017/01/15/5-min-tutorial-k-means-clustering-in-python/ ###
##############################################################################################
import random
import math
#Euclidian Distance between two d-dimensional points
def eucldist(p0,p1):