computing complexity of kmeans algorithm -


i want compute complexity of kmeans algorithm based on complexity theory.

i have read standard algorithm of kmeans wikipedia: link

if (you haven't understood k-means) http://home.deib.polimi.it/matteucc/clustering/tutorial_html/kmeans.html

else

initialize means (e.g. picking k samples @ random)

• iterate: (i times)

(1) assign each point nearest mean

(2) move “mean” center of cluster.

(3) finally, algorithm aims @ minimizing objective function, in case squared error function. objective function has complexity of kn see definition.if there m attributes (in place of normal euclidean function time in calculating objective function proportional m)

time complexity of k-means

• let tdist time calculate distance between 2 objects

• each iteration time complexity: o(kntdist)

k = number of clusters (centroids)  n = number of objects 

• bound number of iterations giving o(ikntdist)

• m-dimensional vectors: o(iknm) ----------------> answer

( m large , centroids not sparse )

space complexity of k-means

• store points , centroids

– vector model: o((n + k)m)---------------------->space complexity


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -