BreezeML

API reference

The core public functions, with real signatures and plain-English notes. Everything you import as breezeml.<name>, in one place.

fit()

breezeml.fit(df, target, task='auto') -> ModelRun here

Train a solid model in one line. Pass your table and the name of the column you want to predict; BreezeML cleans, encodes, cross-validates, and returns a fitted Model. Leave task='auto' to let it detect classification vs regression.

In plain English: One line to a trained model: your table plus the answer column. It figures out the rest.

Try it yourself
Output

Press Run to execute this snippet.

predict()

breezeml.predict(model, X) -> arrayRun here

Run a fitted model on new rows and get back an array of predictions. X is a DataFrame with the same feature columns you trained on.

In plain English: Point a trained model at new rows, get back its guesses.

Try it yourself
Output

Press Run to execute this snippet.

auto()

breezeml.auto(df, target, task='auto', explain_decisions=False, balanced=False) -> (model, report)

The teaching entry point. It trains the best default model AND hands back a report of what it did. Set explain_decisions=True to narrate every step in plain English, or balanced=True to handle class imbalance.

In plain English: fit() that also teaches: it returns the model and a written account of what it decided.

Exampleruns locally after pip install
import breezeml

df = breezeml.datasets.wine()
model, report = breezeml.auto(df, "wine_class", explain_decisions=True)
print(report)

report()

breezeml.report(model, df) -> ReportRun here

The honest verdict. Runs the whole honesty gauntlet (performance vs a naive baseline, leakage and data-quality audit, class balance, optional fairness) and returns a Report whose verdict is SHIP, WARN, or STOP. Check report.verdict before you ship anything.

In plain English: The one call that says SHIP, WARN, or STOP after checking the model for every common way it could be lying.

Try it yourself
Output

Press Run to execute this snippet.

Model methods

model.evaluate() · report() · explain() · card() · export() · deploy() · predict_interval() · predict_set()Run here

Every fitted Model carries the workflow on itself, so you rarely need the module-level helpers. model.evaluate() reads the cross-validated scores, model.report(df) gives the SHIP/WARN/STOP verdict, model.explain(df) narrates the drivers, model.card() writes a model card, and model.export()/model.deploy() ship it. model.predict_interval() and model.predict_set() add calibrated uncertainty.

In plain English: The model carries its whole toolkit on itself, so you just call m.evaluate(), m.report(), m.explain(), m.export(), and so on.

Try it yourself
Output

Press Run to execute this snippet.

model.predict_interval() · model.predict_set()

model.predict_interval(X, calib_df, alpha=0.1) · model.predict_set(X, calib_df, alpha=0.1)

Honest uncertainty on top of a point guess. For regression, predict_interval() returns lower, point, and upper bounds that cover the truth at your chosen level; for classification, predict_set() returns a set of labels guaranteed to contain the right one. Both need a held-out calibration set, because honest coverage needs unseen data.

In plain English: Add an honest range or short list to any prediction, using a slice of held-back data.

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()
print(m.predict_set(X, calib, alpha=0.1))

export() · deploy() · card()

breezeml.export(model, 'train.py') · breezeml.deploy(model, 'api/') · breezeml.card(model)

Turn a trained model into artifacts you own. export() writes a standalone scikit-learn script with zero breezeml import, deploy() emits a FastAPI app plus Dockerfile and pinned requirements, and card() writes an honest Markdown model card. No lock-in, ever.

In plain English: Three ways to leave with your model: a plain script, a running service, or a written model card. No lock-in.

Exampleruns locally after pip install
import breezeml

df = breezeml.datasets.iris()
m = breezeml.fit(df, "species")

breezeml.export(m, "train.py")     # pure sklearn script
breezeml.deploy(m, "api/")          # FastAPI + Dockerfile
breezeml.card(m, "MODEL_CARD.md")   # governance doc

save() · load() · from_csv()

breezeml.save(model, path) · breezeml.load(path) · breezeml.from_csv(path, target)

Persist a model to disk with joblib and read it back later, or train straight from a CSV file without loading it into pandas yourself.

In plain English: Freeze a model to a file and load it back later, or train straight from a CSV.

Exampleruns locally after pip install
import breezeml

m = breezeml.from_csv("data.csv", "target")
breezeml.save(m, "model.joblib")
same = breezeml.load("model.joblib")

datasets

breezeml.datasets.iris() · wine() · breast_cancer() · diabetes()Run here

Practice datasets that each return a pandas DataFrame with a named target column, so every example on this site is one line from a real table. iris, wine, and breast_cancer are classification; diabetes is regression.

In plain English: The ready-made practice tables used all over this site, each with its answer column already named.

Try it yourself
Output

Press Run to execute this snippet.

All sections