Skip to content

Commit 7d78735

Browse files
committed
fixed Album display
1 parent fcf1521 commit 7d78735

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

CCSPiJ/src/chapter6/Album.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ public static void main(String[] args) {
5050
KMeans<Album> kmeans = new KMeans<>(2, albums);
5151
List<KMeans<Album>.Cluster> clusters = kmeans.run(100);
5252
for (int clusterIndex = 0; clusterIndex < clusters.size(); clusterIndex++) {
53-
System.out.println("Cluster " + clusterIndex + ": "
54-
+ clusters.get(clusterIndex).points);
53+
System.out.println("Cluster " + clusterIndex + " Avg Length " +
54+
clusters.get(clusterIndex).centroid.dimensions.get(0) +
55+
" Avg Tracks " + clusters.get(clusterIndex).centroid.dimensions.get(1)
56+
+ ": " + clusters.get(clusterIndex).points);
5557
}
5658
}
5759

0 commit comments

Comments
 (0)