StatQuest: K-means Clustering Explained
An overview of K-means clustering, highlighting its versatility and simplicity, with R code available on the StatQuest GitHub.

StatQuest with Josh Starmer
2.0M views β’ May 23, 2018

About this video
K-means clustering is used in all kinds of situations and it's crazy simple. The R code is on the StatQuest GitHub: https://github.com/StatQuest/k_means_clustering_demo/blob/master/k_means_clustering_demo.R
For a complete index of all the StatQuest videos, check out:
https://statquest.org/video-index/
If you'd like to support StatQuest, please consider...
Patreon: https://www.patreon.com/statquest
...or...
YouTube Membership: https://www.youtube.com/channel/UCtYLUTtgS3k1Fg4y5tAhLbw/join
...buying one of my books, a study guide, a t-shirt or hoodie, or a song from the StatQuest store...
https://statquest.org/statquest-store/
...or just donating to StatQuest!
https://www.paypal.me/statquest
Lastly, if you want to keep up with me as I research and create new StatQuests, follow me on twitter:
https://twitter.com/joshuastarmer
0:00 Awesome song and introduction
0:33 The K-means clustering algorithm
4:26 How to pick a value for K (How to use an elbow plot)
6:06 K-means vs Hierarchical Clustering
6:28 K-means clustering and 2-Dimensional data
7:08 K-means clustering and heatmaps
Corrections:
5:58 I should have put "Reduction in Variation" instead of "Reduction is Variation"
7:25 Point (7,-8) should be in the lower right-hand quadrant.
8:25 The "nclust =25" in the arguments is actually "nstart=25"
#statquest #ML
For a complete index of all the StatQuest videos, check out:
https://statquest.org/video-index/
If you'd like to support StatQuest, please consider...
Patreon: https://www.patreon.com/statquest
...or...
YouTube Membership: https://www.youtube.com/channel/UCtYLUTtgS3k1Fg4y5tAhLbw/join
...buying one of my books, a study guide, a t-shirt or hoodie, or a song from the StatQuest store...
https://statquest.org/statquest-store/
...or just donating to StatQuest!
https://www.paypal.me/statquest
Lastly, if you want to keep up with me as I research and create new StatQuests, follow me on twitter:
https://twitter.com/joshuastarmer
0:00 Awesome song and introduction
0:33 The K-means clustering algorithm
4:26 How to pick a value for K (How to use an elbow plot)
6:06 K-means vs Hierarchical Clustering
6:28 K-means clustering and 2-Dimensional data
7:08 K-means clustering and heatmaps
Corrections:
5:58 I should have put "Reduction in Variation" instead of "Reduction is Variation"
7:25 Point (7,-8) should be in the lower right-hand quadrant.
8:25 The "nclust =25" in the arguments is actually "nstart=25"
#statquest #ML
Tags and Topics
Browse our collection to discover more content in these categories.
Video Information
Views
2.0M
Likes
38.7K
Duration
8:31
Published
May 23, 2018
User Reviews
4.8
(403) Related Trending Topics
LIVE TRENDSRelated trending topics. Click any trend to explore more videos.
No specific trending topics match this video yet.
Explore All Trends