How on graphical output of kmeans clusters in python? I am using the PyCluster package. allUserVector is an n-dimensional dimensional vector, mostly n users with m-functions.
import Pycluster as pc import numpy as np clusterid,error,nfound = pc.kcluster(allUserVector, nclusters=3, transpose=0,npass=1,method='a',dist='e') clustermap, _, _ = pc.kcluster( allUserVector, nclusters=3, transpose=0,npass=1,method='a',dist='e', ) centroids, _ = pc.clustercentroids( allUserVector, clusterid=clustermap ) print centroids print clusterid print nfound
I want to beautifully print clusters on a graph that clearly shows the clusters, which users are in the cluster. Each user is an m-dimensional vector. Any inputs?
python cluster-analysis k-means
Maxwell
source share