BreezeML

Recipes and guides

Copy-paste workflows that string the pieces together, from a raw table to a model you can trust and ship. The first two run right here in your browser; the rest are real local code.

Classification, start to ship

fit -> compare -> report -> card -> exportRun here

The full arc for a category-prediction problem. Train a first model, compare it against the alternatives on the same folds, get an honest SHIP/WARN/STOP verdict, write a model card, then export a standalone script. Press Run to do the first four steps live; the final export line runs locally.

In plain English: The full journey for a which-category problem: train, pick the best, get an honest go or no-go, write the paperwork, and export a portable script.

Try it yourself
Output

Press Run to execute this snippet.

Validate honestly before you deploy

fit -> report -> auditRun here

Never ship on a single accuracy number. Train, ask report() for the one-word verdict, and only trust a SHIP. Run audit() to see the leakage and balance detail behind it. Press Run: this clean model ships, but the pattern is the same when it does not.

In plain English: Never trust a single accuracy number. Get the one-word verdict first, and only ship on a SHIP.

Try it yourself
Output

Press Run to execute this snippet.

Honest uncertainty, not just a guess

predict_interval / predict_set on a calibration split

Give every prediction a calibrated range instead of a bare point. Split off a calibration set, then ask the model for a label set (classification) or an interval (regression) with guaranteed coverage. Run this locally, calibration needs unseen data.

In plain English: Attach an honest range to every prediction instead of a bare guess, using a slice of held-back data to keep it truthful.

Exampleruns locally after pip install
import breezeml
from sklearn.model_selection import train_test_split

df = breezeml.datasets.wine()
train, calib = train_test_split(df, test_size=0.3, random_state=0)
m = breezeml.fit(train, "wine_class")

X = calib.drop(columns=["wine_class"]).head()

# a label set that covers the true class ~90% of the time
print(m.predict_set(X, calib, alpha=0.1))

# for regression targets, use an interval instead:
#   lo, point, hi = m.predict_interval(X, calib, alpha=0.1)

Let an AI agent do it

MCP: train -> report -> confirm SHIP -> deploy

Hand the whole loop to Claude through the MCP server. The agent trains a model, runs report(), and is instructed to confirm a SHIP verdict before it deploys. A WARN or STOP stops the line and the agent reports back instead of shipping a broken model.

In plain English: Hand the whole loop to an AI agent, which is required to prove the model is safe before it is allowed to deploy.

Exampleruns locally after pip install
# one-time setup
pip install "breezeml[mcp]"
claude mcp add breezeml -- breezeml-mcp

# then, in the agent conversation:
#   train(churn.csv, churn)            -> model_1, f1 0.81
#   report(model_1, churn.csv, churn)  -> verdict SHIP
#   (agent confirms SHIP)
#   deploy(model_1, api/)              -> FastAPI app written

All sections