Skip to content
Back to skills

Unsupervised Learning

ASecurity

"Run and debug ML-From-Scratch unsupervised PCA, clustering,

  • 247 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 8, 2026
developmentpythongobashapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill unsupervised-learning --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Unsupervised Learning?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Unsupervised Learning
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-unsupervised-learning/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-unsupervised-learning)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: unsupervised-learning
description: "Run and debug ML-From-Scratch unsupervised PCA, clustering,
  association mining, GMM, genetic search, and RBM workflows."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# ML-From-Scratch Unsupervised Learning

Use this sub-skill when a task asks for ML-From-Scratch workflows in clustering,
dimensionality reduction, density modeling, association mining, transaction
rules, string-target genetic search, or RBM reconstruction. It assumes the
`mlfromscratch` package is importable in a CPU Python environment and keeps all
runtime guidance self-contained.

## Route here

- PCA dimensionality reduction with `PCA().transform(X, n_components)`.
- Clustering with `KMeans`, `DBSCAN`, `PAM`, or `GaussianMixtureModel`.
- Frequent itemset and rule mining with `Apriori` or `FPGrowth`.
- Toy optimization/search with `GeneticAlgorithm` targeting a string.
- Advanced unsupervised reconstruction with `RBM`.

## Route elsewhere

- Supervised regressors, classifiers, trees, ensembles, Bayes, LDA, SVM,
  boosting, and supervised neural estimators: `../supervised-learning/`.
- Low-level neural-network layers, losses, optimizers, CNN/RNN/MLP, GAN,
  DCGAN, and autoencoder assembly details: `../deep-learning/`.
- CartPole, DQN, Gym reset/step compatibility, replay memory, and rendering:
  `../reinforcement-learning/`.
- Cross-cutting package install/import issues: `../../references/troubleshooting.md`.

## Start with these references

- `references/algorithm-catalog.md` for constructors, methods, return values,
  state, and known API quirks.
- `references/workflows.md` for safe recipes: clustering/PCA, association
  mining with string normalization, genetic search, and RBM reconstruction.
- `references/troubleshooting.md` for scaling, DBSCAN density parameters,
  KMeans empty clusters, transaction formatting, support/confidence, RBM speed,
  and headless plotting.
- `../../references/package-overview.md` for package-level install context.
- `../../references/shared-utilities.md` for shared helpers such as
  `normalize`, `standardize`, `euclidean_distance`, and plotting helpers.

## Fast bundled checks

Run these from this sub-skill directory or adapt their in-memory patterns:

```bash
python scripts/run_clustering_smoke.py --help
python scripts/run_clustering_smoke.py
python scripts/run_association_smoke.py
python scripts/run_optimization_smoke.py --iterations 5
```

The bundled scripts avoid network access, credentials, destructive writes, and
interactive plotting. They are smoke checks for import/API usability, not
benchmark or quality claims.

## Operating reminders

- These classes use repo-specific APIs, not scikit-learn estimators. Most
  clustering classes expose `predict(X)` directly; PCA exposes
  `transform(X, n_components)`; there is often no separate `fit` call.
- Cluster labels are arbitrary IDs. Compare partitions by counts, separation,
  or downstream use rather than expecting fixed label numbers.
- Set `numpy.random.seed(...)` before KMeans, PAM, GMM, or GeneticAlgorithm when
  a deterministic result is needed.
- Scale or standardize numeric features before distance- or covariance-based
  algorithms unless all features are already comparable.
- Normalize string transactions before Apriori; use count-style support for
  FPGrowth in this implementation.
- Treat RBM as an advanced, slower reconstruction workflow. Start with tiny
  batches and few iterations before scaling up.

Files in this skill

  • SKILL.md3.4 KB
  • references/algorithm-catalog.md4.1 KB
  • references/troubleshooting.md6.5 KB
  • references/workflows.md5.7 KB
  • scripts/run_association_smoke.py3.9 KB
  • scripts/run_clustering_smoke.py4 KB
  • scripts/run_optimization_smoke.py3.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.