kaggle-linear-models
Safe, modern Kaggle-style SVM and logistic-regression workflows for dense matrices, hashed sparse CSVs, and one-hot categorical tables.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- kaggle-linear-models
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Safe, modern Kaggle-style SVM and logistic-regression workflows for dense matrices, hashed sparse CSVs, and one-hot categorical tables.
- disable-model-invocation
- true
02 资源文件 8
- 参考文档references/api-reference.md3.9 KB
- 参考文档references/data-formats.md3.5 KB
- 参考文档references/troubleshooting.md5.0 KB
- 参考文档references/workflows.md6.9 KB
- 脚本scripts/categorical_logistic_submission.py5.4 KB
- 脚本scripts/hashed_logistic_sgd.py7.8 KB
- 脚本scripts/make_tiny_fixtures.py5.9 KB
- 脚本scripts/sklearn_svm_submission.py3.5 KB
03 SKILL.md 正文
Kaggle Linear Models
Use this sub-skill for classical tabular machine-learning tasks that look like Kaggle starter code and should stay bounded, reproducible, and Python 3 friendly.
Choose a route
- Dense numeric matrix plus class labels: use
scripts/sklearn_svm_submission.py. - Criteo-like sparse CSV with
LabelandIdcolumns: usescripts/hashed_logistic_sgd.py. - Categorical table with
ACTION/idcolumns: usescripts/categorical_logistic_submission.py. - Synthetic smoke fixtures for all helpers: use
scripts/make_tiny_fixtures.py.
Read references/workflows.md for runnable recipes, references/data-formats.md when the CSV layout is unclear, references/api-reference.md for current scikit-learn usage, and references/troubleshooting.md when a run fails.
What this sub-skill includes
- Dense-matrix SVC submissions with configurable SVC arguments.
- Hashed online logistic regression for Criteo-like sparse categorical CSVs.
- One-hot categorical logistic regression with optional bounded cross-validation.
- Interaction-feature guidance from the expanded Amazon-style logistic example, kept reference-only unless the user explicitly asks for a bounded experiment.
What stays out
- Admissions logistic regression with statsmodels. That route is owned by
statsmodels-logit-workflow. - Live Twitter/X ingestion or JSON streaming. That route is owned by
twitter-json-workflow. - Exhaustive greedy feature selection over a large feature lattice.
- Any workflow that depends on the original repository checkout.
If a user asks for one of those excluded routes, point them to the sibling skill that owns that route instead of extending this one.
Quick selection rules
- If the input is a dense numeric matrix with a separate label file, start with
sklearn_svm_submission.py. - If the input is a sparse tabular CSV with
Label/Idcolumns and mixed string or numeric feature values, start withhashed_logistic_sgd.py. - If the input is a categorical CSV with
ACTION/idcolumns, start withcategorical_logistic_submission.py. - If you need tiny fixtures to smoke-test the helpers, generate them first with
make_tiny_fixtures.py.
Expected behavior
- All bundled scripts accept explicit paths and
--help. - The helpers create missing parent directories for outputs.
- The modernized categorical workflow uses
OneHotEncoder(handle_unknown="ignore", sparse_output=True). - The categorical workflow uses bounded
StratifiedKFoldcross-validation only when you request it. - The interaction-feature recipe is documentation only by default; it should not be promoted into a default script unless the user gives a small dataset and a clear budget.
When to read each bundled reference
references/workflows.md: end-to-end command recipes and the reference-only interaction-feature pattern.references/data-formats.md: required columns, label conventions, and output layouts.references/api-reference.md: current sklearn signatures and API replacements for removed legacy names.references/troubleshooting.md: old sklearn API errors, unseen categories, single-class folds, large feature spaces, and the broken v2 hashed script.
When to run each bundled helper
scripts/make_tiny_fixtures.py: create small dense, hashed, and categorical fixtures for smoke tests.scripts/sklearn_svm_submission.py: fit an SVC on dense numeric matrices and write class predictions.scripts/hashed_logistic_sgd.py: fit an online hashed logistic model on Criteo-like CSVs and write probabilities.scripts/categorical_logistic_submission.py: fit a modern sparse one-hot logistic model on categorical CSVs and optionally report bounded CV AUC.
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).