classical-algorithms
Explains ML Glossary classical algorithm families including decision trees, KNN, random forests, boosting, SVM, regression variants, clustering placeholders, and reinforcement-learning basics.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- classical-algorithms
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Explains ML Glossary classical algorithm families including decision trees, KNN, random forests, boosting, SVM, regression variants, clustering placeholders, and reinforcement-learning basics.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/topic-map.md8.6 KB
- 参考文档references/troubleshooting.md3.5 KB
- 脚本scripts/knn_demo.py2.6 KB
03 SKILL.md 正文
Classical Algorithms
Use this sub-skill for ML Glossary tasks about non-neural model families and algorithm comparisons. It covers decision trees, K-nearest neighbors, random forests, boosting, SVMs, ordinary/polynomial/lasso/ridge/stepwise regression, clustering placeholder status, and introductory reinforcement-learning vocabulary.
Read when
- The user asks to compare classical ML classifiers or regressors.
- The task mentions ID3, C4.5, CART, information gain, gain ratio, Gini, KNN, Euclidean distance, random forests, bagging, boosting, AdaBoost-style error focus, SVM margins, kernel trick, OLS, polynomial regression, lasso, ridge, stepwise/spline regression, clustering categories, or Q-learning.
- A documentation task needs a beginner-friendly algorithm entry or caveat about placeholder sections.
- The user asks whether a classical algorithm has an illustrative source snippet in the ML Glossary lineage.
Main references
references/topic-map.mdcontains the self-contained classical algorithm map and comparison tables.references/troubleshooting.mdcovers algorithm-selection mistakes, placeholder pages, and legacy code caveats.scripts/knn_demo.pyis a safe pure-Python KNN demo adapted from the original source idea.
Fast routing
| Task | Use |
|---|---|
| Compare ID3/C4.5/CART | topic-map.md decision-tree section. |
| Explain KNN in classification and regression | topic-map.md plus scripts/knn_demo.py. |
| Compare random forests, bagging, and boosting | topic-map.md ensemble section. |
| Explain SVM hyperplanes, support vectors, margins, and kernel trick | topic-map.md SVM section. |
| Explain regression variants such as OLS, lasso, ridge, polynomial | topic-map.md regression section, then cross-link to basics for formulas. |
| Explain Q-learning or RL vocabulary at a glossary level | topic-map.md reinforcement-learning section. |
| Fill in clustering or applications placeholders | troubleshooting.md placeholder guidance and root ../../references/resources-catalog.md. |
Workflow for answers
- Identify the prediction type: classification, regression, clustering/unsupervised, or reinforcement learning.
- Give the intuition first: nearest neighbors, tree splits, ensemble voting/averaging, margins, or reward-maximizing policy.
- Explain required data assumptions: labeled data for supervised classifiers/regressors, distance metric and
kfor KNN, split criteria for trees, weak learners for boosting, kernel/feature space for SVM. - If code is requested, use the bundled
knn_demo.pyfor KNN. For trees/random forests, describe the algorithm and cite legacy caveats rather than presenting source code as production-ready. - Route math-heavy logistic regression, gradient descent, and evaluation metrics back to
../basics-and-math/SKILL.md. - Route neural-network classifier comparisons to
../neural-networks/SKILL.mdafter covering the classical side.
Boundaries
This sub-skill owns:
- Classical supervised algorithm explanations and comparisons.
- The repo's non-neural algorithm-page status, including placeholders.
- Introductory RL glossary content from the repository.
- Safe KNN demonstration.
Route elsewhere:
- Logistic-regression derivations, sigmoid/log loss, MSE, gradient descent formulas →
../basics-and-math/SKILL.md. - Neural-network architectures or deep classifiers →
../neural-networks/SKILL.md. - Library/dataset/paper recommendations for algorithm practice →
../../references/resources-catalog.md. - Sphinx authoring and build maintenance →
../../references/site-maintenance.md.
Quality checks
- Do not overstate placeholder sections: clustering pages and several RL subsections were incomplete.
- Do not claim legacy tree/random-forest source files are polished APIs; they were evidence for explanations.
- When comparing algorithms, tie the choice to data shape, interpretability, feature scaling, noise/outliers, nonlinearity, and computational cost.
- If the user needs modern scikit-learn commands, label them as modern external guidance rather than repo-grounded API facts.
04 同仓库更多 Skills
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.
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.
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.
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.
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.
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).