supervised-benchmarking
Use Lazy Predict LazyClassifier and LazyRegressor for low-code supervised classification and regression model benchmarking, result interpretation, categorical data handling, and fitted model access.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- supervised-benchmarking
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Use Lazy Predict LazyClassifier and LazyRegressor for low-code supervised classification and regression model benchmarking, result interpretation, categorical data handling, and fitted model access.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md4.1 KB
- 参考文档references/data-and-results.md3.3 KB
- 参考文档references/troubleshooting.md3.4 KB
- 脚本scripts/smoke_supervised.py4.2 KB
03 SKILL.md 正文
Supervised Benchmarking
Use this sub-skill when the task is to compare many sklearn-style classifiers or regressors quickly with Lazy Predict, interpret the ranked result table, recover failed models, or extract fitted pipelines for downstream prediction.
Start here
-
Decide whether the target is classification or regression.
-
Split data yourself with scikit-learn or an equivalent deterministic split.
-
Bound the run when speed matters: choose a small explicit model list,
max_models, and/ortimeoutrather than using every estimator. -
Run the bundled smoke helper if the environment or API contract is in doubt:
python scripts/smoke_supervised.py --task both --max-models 1
Main APIs
Read references/api-reference.md for verified
constructor signatures, fit() return shapes, selected-model syntax,
provide_models(), predict(), and joblib persistence.
Typical bounded classification pattern:
from lazypredict.Supervised import LazyClassifier
from sklearn.linear_model import LogisticRegression
clf = LazyClassifier(
classifiers=[LogisticRegression],
verbose=0,
ignore_warnings=True,
predictions=True,
max_models=1,
)
scores, predictions = clf.fit(X_train, X_test, y_train, y_test)
Typical bounded regression pattern:
from lazypredict.Supervised import LazyRegressor
from sklearn.linear_model import Ridge
reg = LazyRegressor(regressors=[Ridge], verbose=0, ignore_warnings=True)
scores, _ = reg.fit(X_train, X_test, y_train, y_test)
Data and results
Read references/data-and-results.md when the data has pandas categorical columns, boolean columns, custom metrics, cross-validation, prediction output, or model ranking columns that must be validated.
Key reminders:
fit()returns a tuple(scores, predictions_df)for both classifiers and regressors. The predictions DataFrame is empty unlesspredictions=True.categorical_encoderaccepts"onehot","ordinal","target", or"binary"; target and binary encoding require the optionalcategory_encoderspackage.- Inspect
.errorsafter fitting when important models are absent from the result table.
Troubleshooting
Read references/troubleshooting.md for slow or failing estimators, invalid constructor arguments, empty/mismatched datasets, missing optional dependencies, hidden model errors, ROC-AUC surprises, GPU fallback, and model persistence failures.
Route elsewhere
- Use time-series-forecasting for
LazyForecasteror forecast metrics. - Use advanced-workflows for detailed tuning, search spaces, SHAP, and advanced explainability choices.
- Use cli-and-integrations for the CSV CLI, MLflow tracking setup, Dask/PySpark conversion, Spark classes, and package environment checks.
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).