Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Implementing K-Means Clustering | K-Means
Cluster Analysis
course content

Course Content

Cluster Analysis

Cluster Analysis

1. Clustering Fundamentals
2. Core Concepts
3. K-Means
4. Hierarchical Clustering
5. DBSCAN
6. GMMs

book
Challenge: Implementing K-Means Clustering

Task

Swipe to start coding

You are given a synthetic dataset stored in the data variable.

  • Initialize a K-means model with 3 clusters, set random_state to 42, n_init to 'auto' and store it in the kmeans variable.
  • Fit the model on the dataset, predict the cluster labels, and store the result in the labels variable.
  • For each cluster i, extract the points belonging to this cluster and store the result in the cluster_points variable.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 7
toggle bottom row

book
Challenge: Implementing K-Means Clustering

Task

Swipe to start coding

You are given a synthetic dataset stored in the data variable.

  • Initialize a K-means model with 3 clusters, set random_state to 42, n_init to 'auto' and store it in the kmeans variable.
  • Fit the model on the dataset, predict the cluster labels, and store the result in the labels variable.
  • For each cluster i, extract the points belonging to this cluster and store the result in the cluster_points variable.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 7
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt