Products
Features
YouTube Video Summarizer
Summarize YouTube videos
Web & PDF Highlighter
Highlight web pages & PDFs
Chat with PDF
Ask any PDF questions with AI
Ask AI Clone
Chat with your highlights & memories
Audio Transcriber
Transcribe audio files to text
Glasp Reader
Read and highlight articles
Kindle Highlight Export
Export your Kindle highlights
Idea Hatch
Hatch ideas from your highlights
Integrations
Obsidian Plugin
Notion Integration
Pocket Integration
Instapaper Integration
Medium Integration
Readwise Integration
Snipd Integration
Hypothesis Integration
Apps & Extensions
Chrome Extension
Safari Extension
Edge Add-ons
Firefox Add-ons
iOS App
Android App
Discover
Discover
Ideas
Discover new ideas and insights
Articles
Curated articles and insights
Books
Book recommendations by great minds
Posts
Essays and notes from readers
Quotes
Inspiring quotes collection
Videos
Curated videos and summaries
Explore Glasp
Glasp Newsletter
Weekly insights and updates
Glasp Talk
Interview series with great minds
Glasp Blog
Latest news and articles
Glasp Use Cases
Learn how others use Glasp
Build & Support
Glasp API
Access Glasp's API for developers
MCP Connector
Connect Glasp to Claude & ChatGPT
Community
Glasp Reddit Community
Students
Student discount and benefits
FAQs
Frequently Asked Questions
AboutPricing
DashboardLog inSign up

What Is K-Means Clustering and How Does It Work?

1.5M views
•
May 23, 2018
by
StatQuest with Josh Starmer
YouTube video player
What Is K-Means Clustering and How Does It Work?

TL;DR

K-means clustering is a method to group data into clusters based on their proximity. It starts by selecting the desired number of clusters (K) and randomly initializing them. The algorithm assigns each point to the nearest cluster, recalculates the cluster means, and iterates until clusters stabilize, optimizing the total variation within each cluster.

Transcript

statcast stat quest stat quest stat quest hello I'm Josh stormer and welcome to stat quest today we're going to be talking about k-means clustering we're gonna learn how to cluster samples that can be put on a line on an XY graph and even on a heat map and lastly we'll also talk about how to pick the best value for K imagine you had some data that ... Read More

Key Insights

  • 😉 K-means clustering is a simple but effective algorithm for grouping data based on proximity.
  • 😉 The initial cluster selection and mean calculation steps are crucial in the k-means clustering process.
  • ❓ The quality of clustering can be assessed by measuring the total variation within each cluster.
  • 👌 Determining the optimal value of K can be done by observing the reduction in variation as K increases.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: How do you decide the value of K for k-means clustering?

One method is to try different values for K and compare the total variation within the clusters. The best K value is typically where there is a significant reduction in variation, often seen as an "elbow" in the reduction plot.

Q: How is k-means clustering different from hierarchical clustering?

K-means clustering assigns data points to a predefined number of clusters, while hierarchical clustering determines pairwise similarities and creates a tree-like structure.

Q: Can k-means clustering be applied to data plotted on a heatmap?

Yes, k-means clustering can be used with data plotted on a heatmap. The Euclidean distance between data points is calculated, and the clustering process follows the same steps as in other scenarios.

Q: Is plotting the data necessary for k-means clustering?

Plotting the data is not required for k-means clustering. The distances between data points are calculated to determine their proximity and assign them to clusters.

Summary & Key Takeaways

  • K-means clustering is a method used to cluster data points into groups based on their proximity to each other on a line, XY graph, or heat map.

  • The process starts by selecting the number of clusters (K) and randomly initializing the initial clusters.

  • The algorithm then assigns each data point to the nearest cluster, calculates the mean of each cluster, and repeats the process until the clusters no longer change.


Read in Other Languages (beta)

English

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Explore More Summaries from StatQuest with Josh Starmer 📚

Hypothesis Testing and The Null Hypothesis, Clearly Explained!!! thumbnail
Hypothesis Testing and The Null Hypothesis, Clearly Explained!!!
StatQuest with Josh Starmer
What Are One-Hot, Label, and Target Encoding Techniques? thumbnail
What Are One-Hot, Label, and Target Encoding Techniques?
StatQuest with Josh Starmer
CatBoost Part 2: Building and Using Trees thumbnail
CatBoost Part 2: Building and Using Trees
StatQuest with Josh Starmer
Gradient Boost Part 2 (of 4): Regression Details thumbnail
Gradient Boost Part 2 (of 4): Regression Details
StatQuest with Josh Starmer
Sample Size and Effective Sample Size, Clearly Explained!!! thumbnail
Sample Size and Effective Sample Size, Clearly Explained!!!
StatQuest with Josh Starmer
How Does Gradient Boosting Work for Regression? thumbnail
How Does Gradient Boosting Work for Regression?
StatQuest with Josh Starmer

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Apps & Extensions

  • Chrome Extension
  • Safari Extension
  • Edge Add-ons
  • Firefox Add-ons
  • iOS App
  • Android App

Key Features

  • YouTube Video Summarizer
  • Web & PDF Summarizer
  • Web & PDF Highlighter
  • Chat with PDF
  • Ask AI Clone
  • Audio Transcriber
  • Glasp Reader
  • Kindle Highlight Export
  • Idea Hatch

Integrations

  • Obsidian Plugin
  • Notion Integration
  • Pocket Integration
  • Instapaper Integration
  • Medium Integration
  • Readwise Integration
  • Snipd Integration
  • Hypothesis Integration

More Features

  • APIs
  • MCP Connector
  • Blog & Post
  • Embed Links
  • Image Highlight
  • Personality Test
  • Quote Shots

Company

  • About us
  • Blog
  • Community
  • FAQs
  • Job Board
  • Newsletter
  • Pricing
Terms

•

Privacy

•

Guidelines

© 2026 Glasp Inc. All rights reserved.