Metadata-Version: 2.4
Name: wiselearn
Version: 0.1.0
Summary: An ML library that teaches you while you train — and catches mistakes before they cost you weeks.
Project-URL: Homepage, https://github.com/TheAhsanFarabi/wiselearn
Project-URL: Repository, https://github.com/TheAhsanFarabi/wiselearn
Project-URL: Issues, https://github.com/TheAhsanFarabi/wiselearn/issues
Author-email: Ahsan Farabi <ahsanfarabi1971@gmail.com>
License: MIT
License-File: LICENSE
Keywords: auto-ml,beginner,education,leakage,machine-learning,ml,scikit-learn
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
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: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Requires-Dist: joblib>=1.3
Requires-Dist: numpy>=1.24
Requires-Dist: pandas>=2.0
Requires-Dist: rich>=13.0
Requires-Dist: scikit-learn>=1.3
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# wiselearn 🦉

> Train ML models wisely. Catch mistakes before they cost you weeks.

`wiselearn` is a Python library for people who want to **learn ML by doing** — not by running `.fit()` and hoping. It walks you through every step of the ML pipeline, explains what it's doing and why, and catches the silent mistakes that even experienced data scientists miss (data leakage, class imbalance, wrong metrics, overfitting).

## Install

```bash
pip install wiselearn
```

## Quick Start

```python
import wiselearn as wl

# 1. Load
data = wl.load("house_prices.csv")

# 2. Explore — surfaces only the 3-5 things that actually matter
wl.explore(data, target="price")

# 3. Clean — handles missing values, duplicates, with explanations
data = wl.clean(data)

# 4. Prepare — split, encode, scale (with leakage protection)
prep = wl.prepare(data, target="price")

# 5. Train — picks the right model and explains why
model = wl.train(prep)

# 6. Evaluate — uses the RIGHT metric for your problem
wl.evaluate(model, prep)

# 7. Explain — what features matter, and why
wl.explain(model)

# 8. Save (model + transformations together)
wl.save(model, prep, "house_model.wl")

# Later — on new data
new_data = wl.load("new_listings.csv")
predictions = wl.predict(model, new_data, prep=prep)
```

## What makes wiselearn different

**It catches your mistakes before training:**

```python
>>> wl.train(prep)
🚨 LEAKAGE DETECTED — stopping before training

Column 'days_until_default' has correlation 0.97 with target 'defaulted'.
This column likely contains information from AFTER the prediction moment.
If you train with this, you'll get 99% accuracy in testing but the model
will be USELESS in production.

Options:
  1. Remove it:  wl.train(prep, drop=["days_until_default"])
  2. Override:   wl.train(prep, ignore_leakage=True)
```

## License

MIT
