Use kmeans to extract centroids and Get PCA matrix