Metadata-Version: 2.4
Name: mlplt
Version: 0.1.5
Summary: The complete ML toolkit — EDA, cleaning, training, explainability, deployment
Author-email: mlpilot contributors <mlpilot@example.com>
License: MIT License
        
        Copyright (c) 2026 mlpilot contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/yourusername/mlpilot
Project-URL: Documentation, https://mlpilot.readthedocs.io
Project-URL: Bug Tracker, https://github.com/yourusername/mlpilot/issues
Keywords: machine-learning,eda,data-science,automl,explainability
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=1.5
Requires-Dist: numpy>=1.23
Requires-Dist: scikit-learn>=1.2
Requires-Dist: matplotlib>=3.6
Requires-Dist: seaborn>=0.12
Requires-Dist: plotly>=5.0
Requires-Dist: rich>=13.0
Requires-Dist: joblib>=1.2
Requires-Dist: ollama>=0.1.0
Requires-Dist: groq>=0.5.0
Requires-Dist: fairlearn>=0.9.0
Provides-Extra: xgb
Requires-Dist: xgboost>=1.7; extra == "xgb"
Provides-Extra: lgbm
Requires-Dist: lightgbm>=4.0; extra == "lgbm"
Provides-Extra: shap
Requires-Dist: shap>=0.42; extra == "shap"
Provides-Extra: optuna
Requires-Dist: optuna>=3.0; extra == "optuna"
Provides-Extra: prophet
Requires-Dist: prophet>=1.1; extra == "prophet"
Provides-Extra: nlp
Requires-Dist: transformers>=4.30; extra == "nlp"
Requires-Dist: sentence-transformers>=2.2; extra == "nlp"
Provides-Extra: imb
Requires-Dist: imbalanced-learn>=0.11; extra == "imb"
Provides-Extra: deploy
Requires-Dist: fastapi>=0.100; extra == "deploy"
Requires-Dist: uvicorn>=0.23; extra == "deploy"
Provides-Extra: ai
Requires-Dist: ollama; extra == "ai"
Requires-Dist: groq; extra == "ai"
Requires-Dist: fairlearn; extra == "ai"
Provides-Extra: full
Requires-Dist: mlpilot[ai,deploy,imb,lgbm,nlp,optuna,prophet,shap,xgb]; extra == "full"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: ruff>=0.1; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Requires-Dist: pre-commit>=3.0; extra == "dev"
Dynamic: license-file

# mlpilot 🚀

[![PyPI version](https://badge.fury.io/py/mlplt.svg)](https://badge.fury.io/py/mlplt)
[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Tests](https://github.com/yourusername/mlpilot/actions/workflows/test.yml/badge.svg)](https://github.com/yourusername/mlpilot/actions)
[![Downloads](https://pepy.tech/badge/mlplt/month)](https://pepy.tech/project/mlplt)

**mlpilot** is the complete Python ML toolkit — what currently takes 30–40 hours of repetitive boilerplate takes **5–10 minutes**. One import. Every tool you need. Full explainability.

```python
import mlpilot as ml

eda    = ml.analyze(df, target='churn')          # 12-section EDA report
clean  = ml.clean(df, target='churn')            # auto null/outlier/dtype fixing
feats  = ml.features(clean.df, target='churn')  # leakage-safe feature pipeline
board  = ml.baseline(X_train, y_train)           # 15+ model leaderboard in 2 min
tuned  = ml.tune('lgbm', X_train, y_train)       # Bayesian hyperparameter search
exp    = ml.explain(tuned.best_model, X_train)   # SHAP global + local explanations
api    = ml.deploy(tuned.best_model)             # FastAPI + Docker in 5 minutes
api.serve(port=8000)                              # → localhost:8000/predict
```

## Why mlpilot?

| Feature | mlpilot | ydata-profiling | sweetviz | PyCaret | SHAP |
|---|---|---|---|---|---|
| Smart EDA report | ✅ | ✅ | ✅ | ❌ | ❌ |
| Auto data cleaning | ✅ | ❌ | ❌ | Partial | ❌ |
| Multi-model baseline | ✅ | ❌ | ❌ | ✅ | ❌ |
| Hyperparameter tuning | ✅ | ❌ | ❌ | ✅ | ❌ |
| Model explainability | ✅ | ❌ | ❌ | ❌ | ✅ |
| Time series | ✅ | ❌ | ❌ | ✅ | ❌ |
| NLP pipeline | ✅ | ❌ | ❌ | ✅ | ❌ |
| API deployment | ✅ | ❌ | ❌ | ❌ | ❌ |
| AI data analyst | ✅ | ❌ | ❌ | ❌ | ❌ |
| Undo / diff reports | ✅ | ❌ | ❌ | ❌ | ❌ |

## Installation

```bash
# Core (EDA, cleaning, validation, features, training)
pip install mlplt

# With specific extras
pip install mlplt[xgb,lgbm,shap,optuna]

# Everything
pip install mlplt[full]
```

**Available extras:** `xgb`, `lgbm`, `shap`, `optuna`, `prophet`, `nlp`, `imb`, `deploy`, `ai`, `full`

## Modules

| Module | Function | Description |
|---|---|---|
| SmartEDA | `ml.analyze(df)` | 12-section EDA report with plots |
| AutoCleaner | `ml.clean(df)` | Auto null/outlier/dtype fixing with undo |
| DataValidator | `ml.validate(df)` | Schema, leakage, drift detection |
| FeatureForge | `ml.features(df)` | Leakage-safe encoding + scaling pipeline |
| BaselineBlitz | `ml.baseline(X, y)` | 15+ model comparison leaderboard |
| EvalSuite | `ml.evaluate(model, X, y)` | All metrics + diagnostic plots |
| HyperX | `ml.tune(model, X, y)` | Bayesian hyperparameter optimization |
| Explainer | `ml.explain(model, X)` | SHAP global + local + what-if |
| BalanceKit | `ml.balance(X, y)` | Auto SMOTE/ADASYN/class_weight |
| TimeSense | `ml.forecast(df)` | Multi-model time series forecasting |
| TextML | `ml.text_classify(df)` | NLP classification + embeddings |
| LaunchPad | `ml.deploy(model)` | FastAPI + Docker generation |
| AIAnalyst | `ml.analyst(df)` | Ask questions in plain English |

## Quick Start — Churn Prediction

```python
import mlpilot as ml
import pandas as pd

df = pd.read_csv('churn.csv')

# 1. Understand your data
eda = ml.analyze(df, target='Churn', report_format='html')

# 2. Clean it
df_clean = ml.clean(df, target='Churn').df

# 3. Engineer features (leakage-safe)
feats = ml.features(df_clean, target='Churn')
X_train, X_test, y_train, y_test = ml.split(feats, test_size=0.2, stratify=True)

# 4. Handle imbalance
bal = ml.balance(X_train, y_train)

# 5. Find the best model
board = ml.baseline(bal.X_resampled, bal.y_resampled, X_test=X_test, y_test=y_test)
board.leaderboard.print()

# 6. Tune + evaluate
tuned = ml.tune('lgbm', bal.X_resampled, bal.y_resampled, time_budget=300)
eval_r = ml.evaluate(tuned.best_model, X_test, y_test, optimize_threshold=True)

# 7. Explain
exp = ml.explain(tuned.best_model, X_train, X_test)
exp.feature_importance()

# 8. Deploy
ml.deploy(tuned.best_model, X_sample=X_test.iloc[:10]).serve(port=8000)
```

## Documentation

Full API reference: [mlpilot.readthedocs.io](https://mlpilot.readthedocs.io)

## Contributing

1. Fork the repo
2. `pip install -e ".[dev]"`
3. `pre-commit install`
4. Make your changes + add tests
5. `pytest tests/ --cov=mlpilot`
6. Open a pull request

## License

MIT — see [LICENSE](LICENSE).
