I have a sparse matrix
from scipy.sparse import *
M = csr_matrix((data_np, (rows_np, columns_np)));
then I'm doing clustering that way
from sklearn.cluster import KMeans
km = KMeans(n_clusters=n, init='random', max_iter=100, n_init=1, verbose=1)
km.fit(M)
and my question is extremely noob: how to print the clustering result without any extra information. I don't care about plotting or distances. I just need clustered rows looking that way
Cluster 1
row 1
row 2
row 3
Cluster 2
row 4
row 20
row 1000
...
How can I get it? Excuse me for this question.