AGENT SKILL

unsupervised-learning

Run and debug ML-From-Scratch unsupervised PCA, clustering, association mining, GMM, genetic search, and RBM workflows.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

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

02 资源文件 6

03 SKILL.md 正文

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:

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.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351