Skip to main content

Lazy Predict [Nightly]

Lazy Predict 2.0 to help you benchmark models without much code and understand what works better without any hyperparameter tuning.

image Downloads

Getting started

To install Lazy Predict Nightly:

pip install lazypredict-nightly

Optional extras for boosted trees are available when you want the full model catalog:

pip install "lazypredict-nightly[boosting]"

To use Lazy Predict in a project:

import lazypredict

Public API

Lazy Predict Nightly keeps the main benchmarking classes at the package root:

    from lazypredict import (
        LazyClassifier,
        LazyRegressor,
        LazyTimeSeriesClassification,
        LazyTimeSeriesForecasting,
        AutoLazyClassifier,
        AutoLazyRegressor,
        ClassificationMetrics,
        RegressionMetrics,
        TimeSeriesMetrics,
    )

Examples

The examples below use multiple datasets from sklearn so you can see how the package fits different use cases.

Classification

Binary and multiclass examples using breast cancer and iris.

    from lazypredict import LazyClassifier

    from sklearn.datasets import load_breast_cancer, load_iris
    from sklearn.model_selection import train_test_split

    # Binary classification example
    breast_cancer = load_breast_cancer()
    X = breast_cancer.data
    y = breast_cancer.target

    X_train, X_test, y_train, y_test = train_test_split(X, y,test_size=.5,random_state =123)

    clf = LazyClassifier(verbose=0,ignore_warnings=True, custom_metric=None)
    models,predictions = clf.fit(X_train, X_test, y_train, y_test)

    # Expected output: a DataFrame sorted by Balanced Accuracy and a predictions table.
    print(models)

    # Multiclass classification example
    iris = load_iris()
    X = iris.data
    y = iris.target

    X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=.3, random_state=123)

    clf = LazyClassifier(verbose=0,ignore_warnings=True, custom_metric=None)
    models, predictions = clf.fit(X_train, X_test, y_train, y_test)

    # Expected output: a ranking table with multiclass metrics.
    print(models.head())

    # Lazy Predict prints the full ranking table at runtime; the README keeps this sample short.
    # Top rows typically look like:
    # | Model              | Accuracy | Balanced Accuracy | ROC AUC | F1 Score | Time Taken |
    # | LinearSVC          |    ...   |        ...        |   ...   |   ...    |    ...     |
    # | SGDClassifier      |    ...   |        ...        |   ...   |   ...    |    ...     |
    # | SVC                |    ...   |        ...        |   ...   |   ...    |    ...     |

Regression

Single-output and multi-output examples using California housing and diabetes.

    from lazypredict import LazyRegressor

    from sklearn.datasets import fetch_california_housing, load_diabetes
    from sklearn.utils import shuffle
    import numpy as np

    # Single-output regression example
    housing = fetch_california_housing()
    X, y = shuffle(housing.data, housing.target, random_state=13)
    X = X.astype(np.float32)

    offset = int(X.shape[0] * 0.9)

    X_train, y_train = X[:offset], y[:offset]
    X_test, y_test = X[offset:], y[offset:]

    reg = LazyRegressor(verbose=0, ignore_warnings=False, custom_metric=None)
    models, predictions = reg.fit(X_train, X_test, y_train, y_test)

    # Expected output: a DataFrame sorted by Adjusted R-Squared and optional predictions.
    print(models)

    # LightGBM may print informational warnings while fitting; this is expected.

    # Multi-output style regression example built from diabetes features
    diabetes = load_diabetes()
    X = diabetes.data.astype(np.float32)
    y = np.column_stack([diabetes.target, diabetes.target * 0.5])

    offset = int(X.shape[0] * 0.9)

    X_train, y_train = X[:offset], y[:offset]
    X_test, y_test = X[offset:], y[offset:]

    reg = LazyRegressor(verbose=0, ignore_warnings=False, custom_metric=None)
    models, predictions = reg.fit(X_train, X_test, y_train, y_test)

    # Expected output: a ranking table for multi-output regression support.
    print(models.head())

    # Lazy Predict prints the full ranking table at runtime; the README keeps this sample short.
    # Top rows typically look like:
    # | Model              | Adjusted R-Squared | R-Squared | RMSE | Time Taken |
    # | SVR                |         ...        |    ...    | ...  |    ...     |
    # | RandomForestRegressor |      ...        |    ...    | ...  |    ...     |
    # | XGBRegressor / LGBMRegressor may appear when the optional boosting extra is installed.

Time Series

Lazy Predict Nightly also provides wrappers for supervised time series workflows.

1-step forecasting

    from lazypredict import LazyTimeSeriesForecasting
    from sklearn.datasets import load_diabetes

    # Use the diabetes features as a multivariate time-series-style input
    data = load_diabetes()
    series = data.data

    model = LazyTimeSeriesForecasting(lookback=10, horizon=1, test_size=0.2)
    scores, predictions = model.fit(series)

    # Expected output: a DataFrame ranked by Adjusted R-Squared.
    print(scores.head())
    from lazypredict import LazyTimeSeriesForecasting
    from sklearn.datasets import load_diabetes

    # Walk-forward backtesting with expanding chronological splits
    data = load_diabetes()
    series = data.data

    model = LazyTimeSeriesForecasting(lookback=10, horizon=1, test_size=0.2, n_splits=3)
    scores = model.backtest(series)

    # Expected output: a model ranking averaged across walk-forward splits.
    print(scores.head())

Multi-step forecasting

    from lazypredict import LazyTimeSeriesForecasting
    from sklearn.datasets import fetch_california_housing

    # Use California housing columns as multivariate inputs
    housing = fetch_california_housing()
    series = housing.data

    model = LazyTimeSeriesForecasting(lookback=10, horizon=3, test_size=0.2)
    scores, predictions = model.fit(series)

    # Expected output: a multi-step forecasting benchmark table.
    print(scores.head())

1-step classification

    from lazypredict import LazyTimeSeriesClassification
    from sklearn.datasets import load_breast_cancer

    # Use breast cancer features as a multivariate sequence with binary labels
    data = load_breast_cancer()
    series = data.data
    labels = data.target

    model = LazyTimeSeriesClassification(lookback=10, horizon=1, test_size=0.2)
    scores, predictions = model.fit(series, labels)

    # Expected output: a classification benchmark table ranked by Balanced Accuracy.
    print(scores.head())
    from lazypredict import LazyTimeSeriesClassification
    from sklearn.datasets import load_breast_cancer

    # Walk-forward backtesting with chronological classification windows
    data = load_breast_cancer()
    series = data.data
    labels = data.target

    model = LazyTimeSeriesClassification(lookback=10, horizon=1, test_size=0.2, n_splits=3)
    scores = model.backtest(series, labels)

    # Expected output: a classification benchmark table averaged across splits.
    print(scores.head())

Multi-step classification

    from lazypredict import LazyTimeSeriesClassification
    from sklearn.datasets import load_iris

    # Use iris features with labels aligned to successive windows
    data = load_iris()
    series = data.data
    labels = data.target

    model = LazyTimeSeriesClassification(lookback=10, horizon=3, test_size=0.2)
    scores, predictions = model.fit(series, labels)

    # Expected output: a multi-step classification benchmark table.
    print(scores.head())

Metric containers

    from lazypredict import ClassificationMetrics, RegressionMetrics, TimeSeriesMetrics

    classification_metrics = TimeSeriesMetrics.classification(y_true, y_pred)
    forecasting_metrics = TimeSeriesMetrics.forecasting(y_true, y_pred)

    # The underlying metric containers are also available directly.
    accuracy = ClassificationMetrics.accuracy(y_true, y_pred)
    balanced_accuracy = ClassificationMetrics.balanced_accuracy(y_true, y_pred)
    f1_score_value = ClassificationMetrics.f1(y_true, y_pred)
    r_squared = RegressionMetrics.r_squared(y_true, y_pred)
    adjusted_r_squared = RegressionMetrics.adjusted_r_squared(y_true, y_pred, n_features=X_test.shape[1])

Automatic Model Selection

If you want Lazy Predict Nightly to return the best model directly, use the auto wrappers.

    from lazypredict import AutoLazyClassifier, AutoLazyRegressor
    from sklearn.datasets import load_iris, load_diabetes

    # Best classification model from the iris dataset
    iris = load_iris()
    X_train, X_test, y_train, y_test = train_test_split(iris.data, iris.target, test_size=.3, random_state=123)

    auto_clf = AutoLazyClassifier(metric="Balanced Accuracy")
    best_name, best_model, scores = auto_clf.fit(X_train, X_test, y_train, y_test)

    # Expected output: best_name + fitted pipeline + full score table.
    print(best_name)

    # Best regression model from the diabetes dataset
    diabetes = load_diabetes()
    X_train, X_test, y_train, y_test = train_test_split(diabetes.data, diabetes.target, test_size=.3, random_state=123)
    auto_reg = AutoLazyRegressor(metric="Adjusted R-Squared")
    best_name, best_model, scores = auto_reg.fit(X_train, X_test, y_train, y_test)

    print(best_name)
    from lazypredict import AutoLazyTimeSeriesClassifier, AutoLazyTimeSeriesForecasting
    from sklearn.datasets import load_breast_cancer, fetch_california_housing

    # Best time-series classifier from breast cancer windows
    data = load_breast_cancer()
    auto_ts_clf = AutoLazyTimeSeriesClassifier(metric="Balanced Accuracy")
    best_name, best_model, scores = auto_ts_clf.fit(data.data, data.target)

    print(best_name)

    # Best time-series forecaster from California housing windows
    housing = fetch_california_housing()
    auto_ts_reg = AutoLazyTimeSeriesForecasting(metric="Adjusted R-Squared")
    best_name, best_model, scores = auto_ts_reg.fit(housing.data)

    print(best_name)

Lastest Release

0.5.0 (2026-06-27)

  • Refactored the package into dedicated classifier, regressor, auto-selection, and time-series modules.
  • Added class-based metric containers for classification, regression, and time-series evaluation.
  • Added leakage-aware time-series holdout splitting and walk-forward backtesting.
  • Added automatic model selection wrappers for classification, regression, and time-series workflows.
  • Improved ROC AUC handling to use probabilistic or margin-based outputs.
  • Made xgboost and lightgbm optional extras instead of hard requirements.
  • Expanded test coverage for imbalanced multiclass classification, multi-output regression, and time-series edge cases.
  • Updated the README with the new API, backtest examples, and shorter example outputs.

Notable changes

  • supervised.py was reduced to a compatibility layer, while the real implementations now live in separate modules.
  • init.py now exposes a cleaner public API. requirements.txt is lighter, with boosting libraries now installable via extras.
  • Time-series benchmarking is now more leakage-aware and supports backtesting.
  • Tests and smoke coverage were expanded significantly.

Potential breaking changes

  • Some old helper-style metric imports were removed in favor of class-based access.
  • Time-series usage is now documented and structured around the new backtest() API.
  • If you relied on xgboost or lightgbm being installed automatically, you now need the boosting extra.

Install notes

  • Base install
pip install lazypredict-nightly
  • With boosting models
pip install "lazypredict-nightly[boosting]"

Metadata

Release files for lazypredict-nightly 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lazypredict-nightly 0.5.0
File Size Uploaded Provenance Actions
lazypredict_nightly-0.5.0.tar.gz 19.7 kB Without provenance Details for lazypredict_nightly-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lazypredict-nightly 0.5.0
File Interpreter ABI Platform Actions
lazypredict_nightly-0.5.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for lazypredict_nightly-0.5.0-py2.py3-none-any.whl

Total release size: 38.2 kB

Release files / lazypredict_nightly-0.5.0.tar.gz

Download URL lazypredict_nightly-0.5.0.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e05a95621dbfead150fc43a9af0c0c9a3dc1a8270d40bc05ae9b4dab08cf7b42
BLAKE2b-256 checksum
How to use checksums
9e4ad6a689f021d04f9eb91efeb398d3f14c86ba8be06c8a040271dc662ac22e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / lazypredict_nightly-0.5.0-py2.py3-none-any.whl

Download URL lazypredict_nightly-0.5.0-py2.py3-none-any.whl
Size 18.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
c0b6258568f3f6e5a53a8fd7c3d4736a5d3a367cefbdb123b32a08ed825ac739
BLAKE2b-256 checksum
How to use checksums
d62027e8d799b7d198c92c189eece213109392ba031b96ff83f0b97e57967117
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for lazypredict-nightly 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page