RbeginneraiAI generated

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

  1. 01

    Load and scale the data

    ~1h

    Load a numeric dataset, scale the features, and inspect summary statistics.

  2. 02

    Determine the number of clusters

    ~1.5h

    Use the elbow method by plotting within-cluster sum of squares for different k values.

  3. 03

    Run k-means clustering

    ~1h

    Fit a k-means model with the chosen k and attach cluster labels to the original data.

  4. 04

    Visualize clusters with PCA

    ~2h

    Reduce dimensions with PCA and plot the first two components colored by cluster assignment.

Resources

Ready to build this?

Get a GitHub repo and start building. Your AI reviewer checks each step as you go.

~5.5h · 4 steps

Tech stack

statsggplot2factoextra