Compute — the pipeline, and the call
Data science isn't the model — it's the machinery that turns data into a decision. Below is one data pipeline, driven from any angle: the Executive view for the call it produces, Engineer or Analyst for how it's built, the modelling workflow it feeds, and the real thing running live at the bottom.
Related craft: the abstract patterns beneath this — a transform pipeline, a running mean, a single neuron — in Python, C, C++, and C#, and a from-scratch SVM in C++ (SMO + pybind11).
The data pipeline, as an object
One abstract pipeline, no scrolling. The role (what's shown), industry, source (CSV / SQL / API), model, and threshold all reshape the object and its output. The architecture is real (@dataclass abstract classes, composed, a scikit-learn ColumnTransformer + StandardScaler under the hood) — and the cell at the very bottom runs it live in the browser (Pyodide, free CDN, $0), ending in a decision, not a metric.
# Manufacturing: ingest, wrangle, compose — put to use
repo = CsvRepository("changeover_events.csv")
service = WranglingService(numeric=["per_year", "avg_min"],
categorical=["line", "cause"])
pipe = ModelPipeline(repo, service, model=HistGradientBoostingRegressor())The pipeline's output for Manufacturing — the artifact a decision is made from. With a regressor, you get the ranked scorecard above — the drivers, in order. Drag the threshold to move the cut.
| cause | recoverable $/yr |
|---|---|
| tool search | $11,527 |
| first-piece rework | $10,798 |
| material wait | $7,410 |
| calibration | $3,562 |
| paperwork | $2,280 |
X = events.assign(prev_family=events.family.shift(),
same_tool=events.tool.eq(events.tool.shift()))Turn raw line events into per-changeover features: line, product family, shift, prior product, tooling class.
Executes the regressor through the same ColumnTransformer + StandardScaler, entirely in your browser (Pyodide). First Run downloads scikit-learn once — heavier than pandas alone, but still $0 and offline after. Edit and re-run.