Skip to main content

🧠 Universal ML Model Explorer Pro

Python Platform License Maintained Status Build Downloads

One-line ML pipeline that preprocesses, trains, compares, and visualizes the best model — automatically.

Automatically train, evaluate, compare, and visualize multiple machine learning models — all with one command.

🚀 Features

  • Auto detection: Classification or Regression
  • Auto preprocessing: Scaling, Encoding, Imputation, PCA
  • Parallel model training on all cores
  • SHAP interpretability plots
  • Beautiful visual reports (Confusion Matrix, ROC, Residuals, etc.)
  • CLI + Notebook compatible

📦 Installation

pip install -r requirements.txt

🧪 CLI Usage

python main.py path/to/dataset.csv target_column_name

Optional flags:

  • --output_dir: Folder to save results (default: results)
  • --pca_components: Apply PCA on numeric features
  • --no_shap: Disable SHAP plot (faster)

🧬 Python Usage

from lazybrains import run_pipeline_in_notebook

run_pipeline_in_notebook(
    dataset_path="data.csv",
    target_column="target",
    pca_components=5,
    no_shap=False
)

📂 Output

  • best_model.pkl: Trained model
  • Plots: Confusion Matrix, ROC, Residuals, SHAP
  • model_report.txt: Full model comparison

🛠️ Supported Models

  • Linear, Tree-based, Ensemble (RF, GB, AdaBoost, XGBoost), KNN, SVM, Stacking
  • Auto selection of best based on Accuracy / R²

Run this in your terminal to install all dependencies

pip install pandas numpy matplotlib seaborn scikit-learn xgboost shap joblib rich

🔍 AutoFeatSelect

A Lightweight Python Library for Automatic Feature Selection
Smart. Fast. Interpretable.


🚀 What is AutoFeatSelect?

AutoFeatSelect is a fully automated feature selection tool that cleans your dataset by removing irrelevant, redundant, or low-value features—all with just one line of code. Whether you’re building a classification model or regression model, this tool will help you improve model performance and training speed without the hassle of manual preprocessing.


✨ Why AutoFeatSelect is Cool

  • ✅ Zero manual inspection — It decides what to drop based on solid math.
  • 🔄 Handles both numeric & categorical features
  • 📉 Drops features using:
    • Missing value ratio
    • Low variance
    • Correlation (pairwise & clustered)
    • VIF (multicollinearity)
    • Mutual Information
    • Tree-based feature importance
  • 📄 Detailed drop report (feature + reason)
  • 🪶 Lightweight: Only uses pandas, numpy, scikit-learn, statsmodels, scipy

📦 Installation

pip install -U pandas numpy scikit-learn statsmodels scipy

🛠️ How to Use

from lazybrains import AutoFeatSelect

selector = AutoFeatSelect(
    target_col='target',     # Optional if you want supervised feature selection
    verbose=True             # Optional for progress logs
)

# Fit + transform in one line
df_cleaned = selector.fit_transform(df, drop=True)

# Or separately
selector.fit(df)
df_cleaned = selector.transform(df)

# See what got dropped and why
report = selector.get_report()
print(report)

🧠 When to Use

  • Before training ML models, especially with many features
  • When data has potential noise, ID columns, or redundancy
  • To reduce overfitting and improve model interpretability
  • During automated pipelines or pre-model sanity checks

📝 Example Output

[AutoFeatSelect] Running: Drop high missing values...
[AutoFeatSelect]   Dropped: ['unimportant_column']
[AutoFeatSelect] Running: Drop single value columns...
[AutoFeatSelect]   Dropped: ['constant_feature']
...
[AutoFeatSelect] Finished selection. Kept 22 out of 48 features.

📊 Feature Drop Criteria

Technique Purpose
Missing Ratio Drops features with mostly nulls
Unique Ratio (ID-like) Removes fake IDs or row-wise unique cols
Variance Threshold Removes constant or near-constant cols
Pearson Correlation Drops highly correlated pairs
Hierarchical Clustering Smarter groupwise redundancy pruning
VIF (Variance Inflation) Drops multicollinear features
Mutual Information Measures info contribution to target
Tree Importance Uses ExtraTrees to measure signal power

🔍 AutoEDAPro

AutoEDAPro is a powerful, plug-and-play Python library for automated Exploratory Data Analysis (EDA).
It takes a pandas DataFrame and gives you a full, beautiful report — with stats, visuals, and deep insights — either inline (Jupyter) or as an HTML file.


🚀 Features

  • 📦 One-line EDA: Pass a DataFrame, get full analysis
  • 🔍 Missing values, constant features, outliers detection
  • 📊 Univariate & Bivariate visualizations (histograms, boxplots, KDE, correlation heatmaps)
  • 🎯 Optional target column analysis for classification & regression
  • 📁 HTML report export with optional logging
  • ✅ Jupyter inline display or standalone HTML output
  • ✨ Built using pandas, seaborn, matplotlib, plotly, numpy

📦 Installation

First, make sure you have Python 3.7+

Install required dependencies:

pip install pandas numpy matplotlib seaborn plotly scikit-learn

Here’s a complete README.md 📘 for your AutoEDAPro library that covers everything a user needs:



🧪 Example Usage

from lazybrains import AutoEDA
import seaborn as sns

# Load sample dataset
df = sns.load_dataset('titanic')

# Run EDA inline (Jupyter)
eda = AutoEDA(target_col='survived')
eda.run(df)

# Run EDA and save report as HTML with logging
eda_html = AutoEDA(target_col='survived', save_report=True, enable_logging=True)
eda_html.run(df)

You can also test the library via CLI by running the script directly:

python autoeda.py

It will:

  • Try to load Titanic dataset via seaborn
  • Fall back to a dummy dataset if that fails
  • Run both inline and saved HTML reports

🧠 Parameters

Parameter Type Default Description
target_col str None Target column for supervised EDA
save_report bool False If True, saves output as HTML
output_filename str None Custom filename for saved HTML
enable_logging bool False If True, creates a log of EDA steps

📁 Output

  • Inline Display: Shows report directly in Jupyter notebooks
  • HTML Report: If save_report=True, saves full interactive report with visualizations

🛠 Structure

Main file: autoeda.py Main class: AutoEDA

Each report contains:

  1. 📄 DataFrame shape, column types
  2. ❓ Missing values overview
  3. 🔁 Duplicate/constant columns
  4. 📊 Univariate plots for all features
  5. ⚠️ Outlier detection using IQR
  6. 🔗 Bivariate correlation heatmap + pairplots
  7. 🎯 Feature vs Target analysis

⚠️ Notes

  • For full display in script (not Jupyter), report is saved as HTML.
  • Uses Plotly CDN — make sure you're online for full interactivity.
  • Logging is optional but useful for debugging long processes.

💡 Ideas for Future

  • Auto feature selection preview
  • Optional modeling report (LazyPredict-style)
  • Model explainability (SHAP, LIME)
  • CLI and web interface

AutoClean 🧼

An advanced, scikit-learn style tabular data preprocessing pipeline.

AutoClean simplifies and automates the process of preparing tabular data for machine learning. From imputing missing values to handling outliers, encoding categoricals, and scaling features — all steps are neatly handled in a single pipeline.


🔧 Features

  • scikit-learn compatible: fit, transform, fit_transform
  • Customizable config-based preprocessing
  • Missing value imputation (mean, median, mode, constant, predictive)
  • Outlier detection and capping (IQR, Z-score)
  • Encoding (OneHot, Ordinal)
  • Feature Scaling (Standard, MinMax, Robust)
  • Detailed transformation summary (with optional Rich UI)

📦 Installation

pip install -r requirements.txt

Make sure scikit-learn, pandas, numpy are installed. For rich logs:

pip install rich

🚀 Quick Start

from lazybrains import AutoClean
import pandas as pd

# Sample data
df = pd.DataFrame({
    'age': [25, 30, None, 45, 50],
    'salary': [1000, 2000, 300000, 4000, None],
    'gender': ['M', 'F', None, 'F', 'M'],
    'city': ['Delhi', 'Mumbai', 'Delhi', 'Bangalore', 'Delhi']
})

# Configuration (optional)
config = {
    'impute': {'age': 'mean', 'gender': 'mode'},
    'outliers': {'salary': {'method': 'iqr', 'capping': True}},
    'encode': {'gender': 'ordinal', 'city': 'ohe'},
    'scale': {'salary': 'StandardScaler'}
}

# Use AutoClean
cleaner = AutoClean(config=config, verbose=True)
cleaned_df = cleaner.fit_transform(df)
print(cleaned_df.head())

⚙️ Configuration Options

config = {
    'impute': {
        'age': 'mean',            # or median, mode, constant, predictive
        'gender': 'mode'
    },
    'outliers': {
        'salary': {'method': 'iqr', 'capping': True}
    },
    'encode': {
        'gender': 'ordinal',      # or 'ohe'
        'city': 'ohe'
    },
    'scale': {
        'salary': 'StandardScaler', # or MinMaxScaler, RobustScaler
    }
}

✅ Output

  • Transformed DataFrame ready for ML.
  • Rich summary of all preprocessing steps.
  • Compatible with any sklearn pipeline.

🧠 Internals

  • Uses IterativeImputer + RandomForestRegressor for predictive imputation.
  • Rich logging with progress bars using the rich package.
  • Modular & extensible design for future enhancements.

🧑‍💻 Author

Made with ❤️ by a passionate Data Scientist.


📄 License

MIT License

Metadata

Release files for lazybrains 4.0.1

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

Source distribution (sdist)

Source distribution for lazybrains 4.0.1
File Size Uploaded
lazybrains-4.0.1.tar.gz 27.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lazybrains 4.0.1
File Interpreter ABI Platform
lazybrains-4.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 51.3 kB

Release files / lazybrains-4.0.1.tar.gz

Download URL lazybrains-4.0.1.tar.gz
Size 27.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8489613fba5eef8d89330889f1575b7634f83d9e46a60d789dc360214db14016
BLAKE2b-256 checksum
How to use checksums
d2fe30d3c87e19bad574775b246e9e676e2b8fdfa91cf09115979a40d1c31c94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.11

Release files / lazybrains-4.0.1-py3-none-any.whl

Download URL lazybrains-4.0.1-py3-none-any.whl
Size 23.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
855fb0365dcc055e1562da4c115b68264176efa85f4c905a87ff69550b292c3e
BLAKE2b-256 checksum
How to use checksums
344cb88ec13b3a154682624ceab7955c3104ecbbcc5e6583bbfbfc92d00e8b12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

4.0.1 This release

2 release files

4.0.0

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.5

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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