We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fcf1521 commit 7d78735Copy full SHA for 7d78735
CCSPiJ/src/chapter6/Album.java
@@ -50,8 +50,10 @@ public static void main(String[] args) {
50
KMeans<Album> kmeans = new KMeans<>(2, albums);
51
List<KMeans<Album>.Cluster> clusters = kmeans.run(100);
52
for (int clusterIndex = 0; clusterIndex < clusters.size(); clusterIndex++) {
53
- System.out.println("Cluster " + clusterIndex + ": "
54
- + clusters.get(clusterIndex).points);
+ System.out.println("Cluster " + clusterIndex + " Avg Length " +
+ clusters.get(clusterIndex).centroid.dimensions.get(0) +
55
+ " Avg Tracks " + clusters.get(clusterIndex).centroid.dimensions.get(1)
56
+ + ": " + clusters.get(clusterIndex).points);
57
}
58
59
0 commit comments