Iris-style Dataset Clustering Explorer
Write an R script that applies k-means clustering to a numeric dataset, determines a reasonable number of clusters with the elbow method, and visualizes the resulting clusters in two dimensions. Learners practice unsupervised learning basics, scaling data, and PCA-based visualization.
- Estimate
- ~5.5h
- Steps
- 4
- Completed by
- 0
- Proposed by
- codeseed.app
stats · ggplot2 · factoextra
Project roadmap
- 01
Load and scale the data
~1hLoad a numeric dataset, scale the features, and inspect summary statistics.
- 02
Determine the number of clusters
~1.5hUse the elbow method by plotting within-cluster sum of squares for different k values.
- 03
Run k-means clustering
~1hFit a k-means model with the chosen k and attach cluster labels to the original data.
- 04
Visualize clusters with PCA
~2hReduce dimensions with PCA and plot the first two components colored by cluster assignment.
Resources
- DocsR Manuals
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack