O'Reilly logo

Pragmatic AI: An Introduction to Cloud-Based Machine Learning, First Edition by Noah Gift

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

BDeciding on Cluster Size

There are many examples of k-means clustering in this book. One of the most commonly asked questions about these is how many clusters should be made. There is no correct answer because clustering is the process of creating labels, and two domain experts may use their judgements differently.

In Figure B.1, I created a cluster of the 2013-2014 NBA season stats, and I labeled the eight clusters by descriptions I thought were useful. Another NBA expert may have created fewer or more clusters.

Image

Figure B.1 NBA Season Clustering

However, there are some ways to help with deciding how many clusters to create. The scikit-learn documentation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required