Analytics
Linear Regression
Fits a least-squares line that predicts a number from one or more other columns, and adds the prediction to every row — including rows where the value to predict is blank.
When to use it
Use it to estimate a measure from its drivers (revenue from spend, time from distance) and to fill in predictions for new rows.
In a pipeline
File InputLinear RegressionExport Excel
Settings
| Setting | Type | Required | Default or hint |
|---|---|---|---|
| Predict (number column) | select | Yes | Select column… |
| From columns (features) | select | Yes | Pick the columns that explain it |
| Prediction column name | text | — | Default: Prediction |
| Add a Model column (JSON for Score Model) | checkbox | — | false |
Example
Revenue from spend
- Predict (number column)=Revenue
- From columns (features)=Spend
| Spend | Revenue |
|---|---|
| 10 | 25 |
| 20 | 46 |
| 30 | 64 |
| 40 | 85 |
| 50 | — |
| Spend | Revenue | Prediction |
|---|---|---|
| 10 | 25 | 25.3 |
| 20 | 46 | 45.1 |
| 30 | 64 | 64.9 |
| 40 | 85 | 84.7 |
| 50 | — | 104.5 |
The run notes say R² = 0.999 and give the model: {"type":"linear","target":"Revenue","features":["Spend"],"intercept":5.5,"coefficients":{"Spend":1.98}}.
Worth knowing
- The model is learned from rows with numbers in every picked column; any row with numbers in the From columns gets a prediction.
- The model is not saved anywhere: copy its JSON from the notes into Score Model, or tick Add a Model column to carry it down the flow.
- Money, percentages and thousands separators are read as numbers ($1,240 is 1240).
- If two From columns say the same thing (one is a multiple of another), the node stops and names them.