技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
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.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
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.
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/or timeout rather 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
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)
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 unless predictions=True.categorical_encoder accepts "onehot", "ordinal", "target", or
"binary"; target and binary encoding require the optional
category_encoders package..errors after fitting when important models are absent from the
result table.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.
LazyForecaster or forecast metrics.