🧪 06 — Exercises: Clustering¶
Dataset¶
import pandas as pd
customers = pd.DataFrame({
"spend": [500, 700, 800, 2500, 2800, 3200, 10000],
"visits": [2, 3, 4, 10, 12, 11, 1],
"tenure": [3, 4, 5, 24, 30, 28, 1]
})
Tasks¶
- scale features
- run K-Means with 2 and 3 clusters
- calculate silhouette score
- profile clusters
- try DBSCAN
- explain which clustering result is most useful