An enhanced LazyPredict-like library with more models, hyperparameter tuning, and visualizations.
Project description
README.md
all_predict
Author: Santu Chall
Email: santuchal@gmail.com
Overview
all_predict is an advanced, production-ready alternative to LazyPredict, providing:
- 30+ regression models and 30+ classification models from scikit-learn, XGBoost, LightGBM, CatBoost, and more.
- Automatic evaluation and ranking of all models.
- Top-3 model hyperparameter tuning using
GridSearchCVwith robust, extended parameter grids for deeper optimization. - Performance metrics, training/prediction time logging.
- Model saving/loading utilities.
- Comparison visualizations.
Installation
pip install all_predict
Quick Start
Regression Example
from sklearn.datasets import make_regression
from all_predict.regression import LazyRegressorPlus
X, y = make_regression(n_samples=500, n_features=10, noise=0.1, random_state=42)
reg = LazyRegressorPlus(verbose=True)
results, tuned = reg.fit(X, y)
print(results.head())
print(tuned)
Classification Example
from sklearn.datasets import make_classification
from all_predict.classification import LazyClassifierPlus
X, y = make_classification(n_samples=500, n_features=10, n_classes=2, random_state=42)
clf = LazyClassifierPlus(verbose=True)
results, tuned = clf.fit(X, y)
print(results.head())
print(tuned)
Robust Parameter Grids
The GridSearchCV now uses expanded hyperparameter grids tailored for each model type:
- Tree-based models:
n_estimators,max_depth,min_samples_split,min_samples_leaf,max_features,bootstrap, learning rate (if applicable) - Linear models:
alpha,l1_ratio, regularization type, solver variations - Boosting models:
n_estimators,learning_rate,max_depth,colsample_bytree,subsample, regularization terms - SVM:
C,kernel,gamma,degree - KNN:
n_neighbors,weights,metric
These grids allow the tuner to explore broader, more robust parameter spaces for significantly better model performance.
Features
- Extended Model List: More models than LazyPredict.
- Top-3 GridSearch Tuning: Automated hyperparameter optimization with deep parameter grids.
- Persistence: Save and load best models.
- Visualization: Compare performance and timings.
Output Example
Regression
| Model | R2 | RMSE | MAE | Train Time | Predict Time |
|---|---|---|---|---|---|
| RandomForestRegressor | 0.95 | 2.10 | 1.50 | 0.12 | 0.02 |
Tuned Models
| Model | Best Params | Best CV Score | Test Score |
|---|---|---|---|
| RandomForestRegressor | {"n_estimators":200, "max_depth":10} | 0.96 | 0.95 |
Comparison with LazyPredict
| Feature | LazyPredict | all_predict |
|---|---|---|
| Model Count | ~20 | 60+ |
| Auto GridSearch Tuning | ❌ | ✅ |
| Robust Parameter Grids | ❌ | ✅ |
| Model Saving/Loading | ❌ | ✅ |
| Visualization | ❌ | ✅ |
| Parallel Processing | Limited | Full |
License
MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file all_predict-0.1.0.tar.gz.
File metadata
- Download URL: all_predict-0.1.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf783e1e74115a0605d5044d4f4c54220725e125b3f7e6abd3cf5507830b34cb
|
|
| MD5 |
4e0846ec69b69f56728b190381e1d35e
|
|
| BLAKE2b-256 |
587822f16f12a56dfb32b86358e7d2a602e17baea9ea6477abdc9a3ecefb98c2
|
Provenance
The following attestation bundles were made for all_predict-0.1.0.tar.gz:
Publisher:
all_predict.yml on santuchal/all_predict
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
all_predict-0.1.0.tar.gz -
Subject digest:
cf783e1e74115a0605d5044d4f4c54220725e125b3f7e6abd3cf5507830b34cb - Sigstore transparency entry: 373546935
- Sigstore integration time:
-
Permalink:
santuchal/all_predict@7dd8298f84414d55328635f27a5ba174b9cce559 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/santuchal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
all_predict.yml@7dd8298f84414d55328635f27a5ba174b9cce559 -
Trigger Event:
release
-
Statement type:
File details
Details for the file all_predict-0.1.0-py3-none-any.whl.
File metadata
- Download URL: all_predict-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
036bcb3f9d521ba6cd871ed98d58dfaae4f9dfcc4c858d7936623a4384bf63ed
|
|
| MD5 |
df5d2fe48c0ee8412faa668292653f6d
|
|
| BLAKE2b-256 |
52c1c3e891a9580aa1b4747aef9dec31416b201b6b0ef0a4c411df6c594b4708
|
Provenance
The following attestation bundles were made for all_predict-0.1.0-py3-none-any.whl:
Publisher:
all_predict.yml on santuchal/all_predict
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
all_predict-0.1.0-py3-none-any.whl -
Subject digest:
036bcb3f9d521ba6cd871ed98d58dfaae4f9dfcc4c858d7936623a4384bf63ed - Sigstore transparency entry: 373546938
- Sigstore integration time:
-
Permalink:
santuchal/all_predict@7dd8298f84414d55328635f27a5ba174b9cce559 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/santuchal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
all_predict.yml@7dd8298f84414d55328635f27a5ba174b9cce559 -
Trigger Event:
release
-
Statement type: