My code
import numpy as np
from pylab import plot,show
import scipy
import scipy.cluster
from scipy.cluster.vq import kmeans, vq
data_sillet = np.loadtxt('clustering_sillet.txt', delimiter=',')
data = data_sillet.astype(int)
print (type(data))
centroids, _ = scipy.cluster.vq.kmeans(data.astype(float), 3)
idx, _ = vq(data,centroids)
How to print all contents of throwaway variable, and not just print (centroids)?
source
share