I am currently working on a set of image data (250,000 images, like vectors of objects, each of them consists of 132 functions) and trying to use the KMeans function provided by sklearn.
I run it on Mac OS X 10.10, Python 2.7 and sklearn 0.15.2, and after a while I get only:
Killed: 9
An error occurred while running these commands:
nb_cls = int(raw_input("Number of clusters chosen :"))
clusterer = sklearn.cluster.KMeans(n_clusters=nb_cls)
clusters_labels = clusterer.fit_predict(X)
silhouette = sklearn.metrics.silhouette_score(X, clusters_labels)
print "n clusters =", nb_cls, "/ silhouette_score =", silhouette
Please note that the code is not killed when calculating the silhouette score.
For smaller datasets (± 2,500 images), the same algorithm is efficient and there is no such Python error.
How could I avoid this Killed 9 error? Is this calculation too ambitious for my laptop?