how to guess the number of cluster when do not know?

Ho Yeung Lee jobmattcon at gmail.com
Fri Aug 4 08:11:10 EDT 2017


i find kmeans has to input number of cluster
but i do not know how many words in photo before recognization in application of robots vision recognition

if separate high, will it become letters instead of word?


from pylab import plot,show
from numpy import vstack,array
from numpy.random import rand
from scipy.cluster.vq import kmeans,vq

# data generation
data = vstack((rand(150,2) + array([.5,.5]),rand(150,2)))

# computing K-Means with K = 2 (2 clusters)
centroids,_ = kmeans(data,2)



More information about the Python-list mailing list