An ML library that teaches you while you train — and catches mistakes before they cost you weeks.
Project description
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
pip install wiselearn
Quick Start
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:
>>> 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
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 wiselearn-0.1.0.tar.gz.
File metadata
- Download URL: wiselearn-0.1.0.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48be8519eec6d0a470d284b0fb8723a6da1a66c5c229fb0a699baedeacb9f0ee
|
|
| MD5 |
638f90bc19ae0d4b4f6c360617aede41
|
|
| BLAKE2b-256 |
728d0030b47274d5396059a0921cba20c2804e4c32e6ad524ce425174a532bd5
|
File details
Details for the file wiselearn-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wiselearn-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ec09d6266b77198d656b6ea403861cd4ed97ff5e72322cd5d8aca24a826f917
|
|
| MD5 |
b823caa427dbd16e8fe99a6e95f53989
|
|
| BLAKE2b-256 |
5fc2630f11d1f6400a03b0a1ca216b2b1fc73b384c805c0196b522447297b95d
|