clustering
Discover patterns in unlabeled data using clustering, dimensionality reduction, and anomaly detection
npx skills add majiayu000/claude-skill-registry --skill clustering-fba66cf1 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Clustering Skill > Discover hidden patterns and groupings in unlabeled data. ## Quick Start ```python from sklearn.cluster import KMeans from sklearn.preprocessing import StandardScaler from sklearn.metrics import silhouette_score # Always scale before clustering scaler = StandardScaler() X_scaled = scaler.fit_transform(X) # Cluster kmeans = KMeans(n_clusters=5, random_state=42, n_init=10) labels = kmeans.fit_predict(X_scaled) # Evaluate score = silhouette_score(X_scaled, labels) print(f"Silhouette Score: {score:.4f}") ``` ## Key Topics ### 1. Clustering Algorithms | Algorithm | Best For | Key Params | |-----------|----------|------------| | **K-Means** | Spherical clusters | n_clusters | | **DBSCAN** | Arbitrary shapes, noise | eps, min_samples | | **Hierarchical** | Nested clusters | linkage | | **HDBSCAN** | Variable density | min_cluster_size | ```python from sklearn.cluster import KMeans, DBSCAN, AgglomerativeClustering import hdbscan algorithms = { 'kmeans': KMeans(n_clusters=5, random_state=42), 'dbscan': DBSCAN(eps=0.5, min_samples=5), 'hierarchical': AgglomerativeClustering(n_clusters=5), 'hdbscan': hdbscan.HDBSCAN(min_cluster_size=15) } ``` ### 2. Finding Optimal K ```p
- Quick Start
- Key Topics
- 1. Clustering Algorithms
- 2. Finding Optimal K
- 3. Dimensionality Reduction
- 4. Anomaly Detection
- 5. Cluster Validation
- Best Practices
- DO
- DON'T
- Exercises
- Exercise 1: Elbow Method
- Exercise 2: Compare Algorithms
- Unit Test Template
What does the clustering skill do?
Discover patterns in unlabeled data using clustering, dimensionality reduction, and anomaly detection
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill clustering-fba66cf1 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
