Metadata-Version: 2.4
Name: mlguide
Version: 1.0.0
Summary: Modular ML toolkit with a built-in guide system for students.
Author: Joel Inian Francis
License: MIT
Project-URL: Homepage, https://github.com/JojoAArtI/AutocleanML
Project-URL: Documentation, https://github.com/JojoAArtI/AutocleanML#readme
Project-URL: Bug Tracker, https://github.com/JojoAArtI/AutocleanML/issues
Keywords: machine learning,automl,data cleaning,preprocessing,sklearn,education,students
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=1.3
Requires-Dist: numpy>=1.21
Requires-Dist: scikit-learn>=1.0
Requires-Dist: joblib>=1.1
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Provides-Extra: viz
Requires-Dist: matplotlib>=3.4; extra == "viz"
Dynamic: license-file

# mlguide 🚀

> **The ML toolkit that teaches you while it works.**

**mlguide** is a modular, student-first ML toolkit with three layers:

1. **Guided Learning** — a built-in interactive help system that explains ML concepts.
2. **Individual Modules** — every pipeline stage is independently importable.
3. **Full Autopilot** — `run_pipeline()` chains everything together.

## Installation

```bash
pip install mlguide
```

## Quick Start

### Autopilot (one line)

```python
from mlguide import sample_data, run_pipeline

df = sample_data("regression")
result = run_pipeline(df, target="price")
```

### Step by Step

```python
from mlguide import load_data, clean, split, encode, scale, train, evaluate

df = load_data("housing.csv")
df = clean(df, target="price")
X_tr, X_te, y_tr, y_te = split(df, target="price")
X_tr, enc = encode(X_tr, fit=True)
X_te, _   = encode(X_te, encoder=enc)
X_tr, sc  = scale(X_tr, fit=True)
X_te, _   = scale(X_te, scaler=sc)
model     = train(X_tr, y_tr, model="random_forest")
metrics   = evaluate(model, X_te, y_te)
```

### Need Help?

```python
from mlguide import guide

guide()              # overview
guide("ml_basics")   # what is ML?
guide("split")       # why we split data
guide("train")       # all available models
guide("cheatsheet")  # compact reference
```

## Features

- **Zero data leakage** — split before encode/scale is enforced by architecture.
- **Transparent** — every function logs what it did and why.
- **Modular** — use any function independently.
- **Student-friendly errors** — typo suggestions, available column listings, clear next-step guidance.
- **Lightweight** — only pandas, numpy, scikit-learn, and joblib.
- **Bundled datasets** — `sample_data("regression")` for instant practice.
- **Text & NLP Extraction** — builtin regex extraction and preprocessing without external NLP libraries.

## API Reference

| Function | Description |
|---|---|
| `guide(topic)` | Interactive help system |
| `run_pipeline(source, target)` | Full autopilot pipeline |
| `load_data(source)` | Load CSV or DataFrame |
| `sample_data(name)` | Bundled practice datasets |
| `clean(df, target)` | Clean data (nulls, duplicates, cardinality) |
| `split(df, target)` | Train/test split with auto-stratification |
| `encode(X, fit=True)` | One-Hot Encode categorical columns |
| `scale(X, method)` | Scale numeric features |
| `detect_task(y)` | Infer regression vs classification |
| `train(X, y, model)` | Train a model |
| `compare_models(X, y)` | Cross-validated model comparison |
| `evaluate(model, X, y)` | Evaluate on test set |
| `predict(model, data)` | Make predictions |
| `save_model(model, path)` | Save model bundle |
| `load_model(path)` | Load model bundle |
| `get_feature_importance(model)` | Feature importance table |
| `extract_emails()`, `extract_phones()` | Regex-based extraction |
| `clean_text()` | Full NLP preprocessing pipeline |

## License

MIT — Joel Inian Francis
