Welcome to Lazy Predict¶
Lazy Predict helps you build and benchmark a large number of machine learning models with minimal code, so you can quickly discover which algorithms work best on your dataset — without any parameter tuning.
Quick Start¶
from lazypredict.Supervised import LazyClassifier
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
data = load_breast_cancer()
X_train, X_test, y_train, y_test = train_test_split(
data.data, data.target, test_size=0.2, random_state=42
)
clf = LazyClassifier(verbose=0, ignore_warnings=True)
models, predictions = clf.fit(X_train, X_test, y_train, y_test)
print(models)
from lazypredict.Supervised import LazyRegressor
from sklearn.datasets import load_diabetes
from sklearn.model_selection import train_test_split
data = load_diabetes()
X_train, X_test, y_train, y_test = train_test_split(
data.data, data.target, test_size=0.2, random_state=42
)
reg = LazyRegressor(verbose=0, ignore_warnings=True)
models, predictions = reg.fit(X_train, X_test, y_train, y_test)
print(models)
What Can It Do?¶
| Task | Class | Models |
|---|---|---|
| Classification | LazyClassifier |
40+ scikit-learn classifiers + XGBoost, LightGBM, CatBoost, cuML |
| Regression | LazyRegressor |
40+ scikit-learn regressors + XGBoost, LightGBM, CatBoost, cuML |
| Time Series | LazyForecaster |
20+ statistical, ML, deep learning, and foundation models |
| Distributed | LazySparkClassifier / LazySparkRegressor |
PySpark MLlib models |
Feature Highlights¶
- Zero-boilerplate benchmarking — one call trains and evaluates all models
- 40+ classifiers and regressors from scikit-learn plus optional boosting libraries
- 20+ time series forecasting models — Naive, ETS, ARIMA, Theta, ML, LSTM/GRU, TimesFM
- GPU acceleration — XGBoost, LightGBM, CatBoost, cuML (RAPIDS), LSTM/GRU, TimesFM
- Automatic seasonal period detection via autocorrelation analysis
- Exogenous variables support in time series forecasting (SARIMAX, AutoARIMA, ML models)
- Multiple categorical encoders — OneHot, Ordinal, Target, Binary
- MLflow integration — automatic experiment tracking via environment variable
- Cross-validation — both train/test split and k-fold CV supported
- Per-model timeout — skip slow models automatically
- Hyperparameter tuning — Optuna, scikit-learn, or FLAML backends
- Explainability — permutation importance and optional SHAP values
- Ensemble methods — simple average, weighted average, stacking
- Visualization — forecast plots, model comparison, residuals, error heatmaps
- Intel Extension acceleration — opt-in CPU speedup via
sklearnex.patch_sklearn() - Python 3.10 – 3.14 support
- MIT licensed, free software
Getting Started¶
-
Install from PyPI, conda-forge, or source. Learn about optional extras.
-
Core usage patterns for classification, regression, time series, and the CLI.
-
Deep dive into
LazyForecaster— all 20+ models, cross-validation, ensembles, and plots. -
Detailed worked examples for every feature with copy-paste code.
-
Explainability, hyperparameter tuning, visualization, distributed computing, and Spark.
-
Complete auto-generated API docs for every public class and function.