Log, compare, and visualize your model runs in a rich Streamlit dashboard — zero cloud, zero setup, just a SQLite file on your machine.
PyMLens wraps around your existing sklearn code with minimal changes and handles all the bookkeeping automatically.
All data lives in a SQLite DB at ~/.pymlens/experiments.db. Nothing ever leaves your machine.
Wrap your existing training loop in a with block. That's it. No refactoring required.
Full metric suites for both problem types — accuracy, F1, precision, recall, R², MSE, RMSE, and more.
3-fold CV enabled by default for classification. Toggle it with a single parameter for regression experiments.
Automatically tracks train vs. validation accuracy side-by-side so you can spot overfitting at a glance.
Groq-powered LLaMA 3.1 analysis: per-model score interpretation, improvement suggestions, and a best-model verdict.
Classification or regression — the API is identical. Wrap, add models, done.
Start_experiment paramsAll parameters available on the context manager's Start_experiment call.
model
required
Any scikit-learn compatible estimator
exp_keyword
str · None
Custom label for this run. Falls back to class name.
cross_val
bool
3-fold CV. Default True for clf, False for regression.
All results persist in a local SQLite database. Re-running with the same experiment name upserts — no duplicates.
Comprehensive metric coverage for both classification and regression, stored per run in SQLite.
| Metric | Description |
|---|---|
| Accuracy | Validation accuracy |
| Train Accuracy | Training accuracy (overfitting check) |
| Precision | Weighted precision |
| Recall | Weighted recall |
| F1 Score | Weighted F1 |
| CV Score | Mean 3-fold CV score |
| Confusion Matrix | JSON stored, visualized as heatmap |
| Metric | Description |
|---|---|
| MSE | Mean Squared Error |
| MAE | Mean Absolute Error |
| RMSE | Root Mean Squared Error |
| R² | Coefficient of determination |
| CV Score | neg_mean_squared_error CV (opt-in) |
Launch the Streamlit dashboard with one command and explore every experiment interactively.
Requires Python ≥ 3.8. Install via pip — all dependencies pulled automatically.
Wrap your training code in a with block and call Start_experiment for each model.
One command opens the full Streamlit dashboard in your browser.
Get a free Groq API key and save it using the settings utility for LLaMA-powered analysis.
The Docker image persists your experiment database across restarts using a named volume. Groq key passed securely as an env variable — never baked in.