# Improve k-means accuracy

Our weapons:

I am experimenting with k-means and Hadoop, where I am chained to these options for various reasons (e.g. Help me win this war!).

The battlefield:

I have articles, which belong to c categories, where c is fixed. I am vectorizing the contents of the articles to TF-IDF features. Now I am running a naive k-means algorithm, which takes c centroids to begin with and starts, iteratively, grouping articles (i.e. rows of the TF-IDF matrix, where you can see here how I built it), until converenge occurs.

Special notes:

1. Initial centroids: Tried with random from within each category or with the mean of all the articles from each category.

2. Distance function: Euclidean.

Question(s):

The accuracy is poor, as expected, can I do any better, by making another choice for the initial centroids, or/and pick another distance function?

print "Hello Data Science site!" :)

• Hello @Dawny33 (Pikachu), Lapras here. :) Thank you! – gsamaras Feb 2 '16 at 1:59