Data science: predict and optimize without a notebook
For analysts ready to go beyond descriptive reporting. 4 lessons, about 60 minutes.
1. A model is a task
A Predict task in train mode takes a CSV and the column to predict. Flowcall works out whether it is a yes/no question or a number, encodes text columns, holds out 20% of rows to score honestly, tries a linear model and boosted trees, keeps the better one, and tells you the baseline it beat and the top signals. The model is saved under Settings → Models with its scores and version.
A second Predict task in score mode applies the latest model to new rows and adds a predicted_<column> column.
Do this: install the template, run it, and read the training log: which algorithm won, and what were the top signals?
Example used: Predict churn risk
2. How to know the model is any good
Look at three things in the training log. The held-out score (accuracy or R²) tells you how it does on rows it has not seen. The baseline tells you what always guessing the majority (or the mean) would score; a model that does not beat it is not a model. The top signals tell you whether it is learning something sensible; if account_id is the top signal, it has memorized noise.
Retrain when the world changes: the registry keeps versions, and a score task can pin one if a retrain gets worse.
Do this: remove a feature from the template's training task, retrain, and compare scores across versions in Settings → Models.
Example used: Predict churn risk
3. Optimization: the best plan under limits
An Optimize task makes one decision per row — how many signups to buy from a campaign, how many agents to staff — under limits written in plain lines: maximize: value_per_signup, total <= 6000, budget: cost_per_signup <= 450000, each <= max_signups, group region total <= 3500. It returns the plan as a new column and, importantly, which limits held the answer back; those are the levers worth negotiating.
Do this: install the template, run it, then raise the budget limit and re-run. Which limit binds now?
Example used: Allocate a limited budget
4. From prediction to decision
The point of a prediction is a better decision, so end the pipeline with one. Chain predict → optimize → approve: the model scores the rows, the optimizer plans under limits, and a person approves the plan from the inbox with the numbers in front of them. Give the approval a value and an outcome check so the decision log can show whether the plans actually worked.
Do this: combine the two templates: use predicted churn risk as an input column in an allocation, and route the result through an approval.
Example used: Allocate a limited budget