Machine learning (Axon)
Axon brings spreadsheet-native machine learning into Anthrena Desk. Type AX. formulas in cells — results spill into the grid, and the Axon panel explains cleaning steps, model metrics, and predictions. All compute runs locally in the analytics engine; your data never leaves this device.
Tagline: Machine learning formulas for your spreadsheet — 100% local.
Quick start (2 minutes)
- Open a datasheet with numeric columns (or use a sample workbook).
- Select a value range (for example a Revenue column).
- On the Data ribbon, use the Machine Learning buttons:
- Forecast → inserts
=AX.FORECAST(…) - Outliers → inserts
=AX.OUTLIERS(…) - Regression → inserts
=AX.REGRESSION(…)
- Forecast → inserts
- Confirm the range in the insert dialog and click Insert.
- Open the Axon side panel (Cleaning / Model / Explain) to read the report.
Paid functions (Predict, Cluster) and the Model ribbon builder need Axon Pro — see Licensing and Free vs Pro below.
Free vs Pro
| Capability | Plan | What it does |
|---|---|---|
AX.FORECAST | Free (Axon Core) | Forecast with 95% confidence bands |
AX.OUTLIERS | Free (Axon Core) | Flag anomalies (IQR + isolation consensus) |
AX.REGRESSION | Free (Axon Core) | OLS stats table (coef, t, p, CI) |
AX.PREDICT | Axon Pro / Desk Pro (ml.advanced) | One-shot random-forest predict + importance |
AX.CLUSTER | Axon Pro / Desk Pro (ml.advanced) | K-means segments + silhouette |
AX.PCA | Axon Pro / Desk Pro (ml.advanced) | Principal components + loadings |
AX.TSNE | Axon Pro / Desk Pro (ml.advanced) | 2D t-SNE embedding |
| Model ribbon builder | Axon Pro / Desk Pro (ml.advanced) | Train a named classification, regression, clustering, forecasting, anomaly, or ranking model once, save it in the workbook, Apply Predict (+ Confidence/Score where meaningful) |
Axon Core ships with Desk — no plugin install and no account. Use Data → Machine learning or type AX.* in the Expression bar.
Axon Pro is Desk Pro (or entitlement plugin.com.anthrena.axon). One product surface named Axon; Pro unlocks advanced formulas and the Model ribbon — not a separate “Lite” plugin.
Ribbon + autocomplete rule: Core Forecast / Outliers / Regression always appear. Advanced AX.* stay visible with a lock glyph until Axon Pro is entitled. The Model ribbon builder groups appear when Axon Pro is entitled. Disable other plugins does not hide Core Axon.
AX.FORECAST / AX.OUTLIERS / AX.REGRESSION always run as Core; advanced AX.* and the Model builder need Axon Pro (or Desk Pro).
Named models (Model ribbon)
Use this when you want a durable model you can reopen and re-score — not a one-shot AX.PREDICT / AX.FORECAST spill.
- Open a datasheet and switch to the Model ribbon.
- Keep Semantic model (Relationships / measures) as today.
- Under Setup, mark columns for the task:
- Category / number / ranking — Feature columns + Target (ranking Target = relevance score)
- Clustering / anomaly — Feature columns only (no target)
- Forecast — Target as the series column; optional Feature columns as exogenous drivers (enables Linear + drivers)
- Tip: select a column range with Shift+click on headers (or drag), then click Feature to mark all selected columns at once. After one Feature mark, Shift+click another header also adds the intervening columns as features. Target stays single-column.
- Choose a Task: Predict a category, Predict a number, Group similar rows, Forecast over time, Flag anomalies, or Rank by relevance.
- Choose an Algorithm:
- Classification — Random forest or Logistic regression
- Regression — Random forest or Linear regression
- Clustering — K-means, DBSCAN, or Gaussian mixture
- Forecasting — Holt-Winters (auto), Holt-Winters, Naive, or Linear + drivers
- Anomaly — IQR ∪ MAD, MAD (modified-z), IQR fences, or Isolation forest
- Ranking — Pointwise ranking (linear) or Pointwise ranking (forest)
- Optionally open Advanced: RF uses Seed / Trees / Max depth (defaults 42 / 32 / 8); logistic/linear use Seed / L2 / Max iterations; k-means / GMM use Seed / Clusters (k) / Max iterations; DBSCAN uses Seed / Eps (empty or 0 = Auto) / Min samples (0 = Auto); forecast uses Horizon / Seasonality (0 = Auto ACF; drivers mode uses Horizon only); anomaly IQR/MAD uses MAD threshold and/or IQR multiplier; Isolation forest uses Seed / Trees / Max depth / Contamination; ranking adds NDCG@k + holdout fraction. Knobs save with the named model for retrain/reopen.
- Train — metrics appear in the Axon builder pane (holdout accuracy / R², silhouette for clustering, time-holdout MAPE / MAE / band coverage for forecast, flagged count / rate / threshold for anomaly, or NDCG@k / Spearman for ranking). Apply stays disabled until Train succeeds. Forecast refuses <8 finite points or an all-constant series. Anomaly refuses <15 complete rows, all-constant features, or useless fits (e.g. every row flagged). Ranking refuses constant relevance / short lists.
- Keep report freezes a Model Report page on the Pages rail (same pattern as Optima’s Answer Report). Forecast reports include the mid line + translucent 95% band chart so the page survives reopen without re-running the engine.
- Apply:
- Category — adds
MODEL.PREDICT+MODEL.CONFIDENCE - Number / clustering — adds
MODEL.PREDICTonly - Ranking — adds
MODEL.PREDICT(rank, 1 = highest) +MODEL.CONFIDENCEas score - Anomaly — adds
MODEL.PREDICT(Normal/Anomaly) +MODEL.CONFIDENCEas{name} Score - Forecast — writes spill columns
{name} Step,{name} Forecast,{name} Lower_95,{name} Upper_95, and creates/updates a line tile with the band fields wired.
- Category — adds
- Edit a feature cell → scores refresh from the saved artifact (no retrain). Forecast spill is static until you Apply again. Missing artifact or schema drift shows
#MODEL?.
Named models and their binary artifacts save inside the .asbx workbook (ZIP entries under models/…, not inline in the JSON manifest). Reopen the workbook to keep scores.
Forecast named model vs AX.FORECAST: The formula is a one-shot spill (in-sample model pick). The named task adds a durable artifact, time-ordered holdout metrics, Model Report transparency, Apply spill + Stage band tile, and Keep-report chart snapshot. Optional driver features fit linear on lag(y) + drivers; future steps reuse the last driver row (95% bands still 1.96·σ·√h).
Anomaly named model vs AX.OUTLIERS: The formula is a one-shot univariate spill (IQR∪MAD). The named task fits durable multi-feature fences or an Isolation Forest, trains on Features only, Apply/rescores Normal/Anomaly (+ Score), and keeps a Model Report.
Ranking vs Predict a number: Ranking’s Target is a relevance score; Apply writes ranks (1 = best) plus the predicted score. Metrics emphasize NDCG@k and Spearman on holdout, not only R².
DBSCAN / GMM vs t-SNE: DBSCAN and Gaussian mixture are named clustering algorithms under Group similar rows. t-SNE stays a one-shot formula (AX.TSNE) for 2D visualization — it is not a durable named model (no Apply / rescore artifact).
Function reference
AX.FORECAST
Signature: AX.FORECAST(values, [horizon], [seasonality])
- values — numeric range or column to forecast
- horizon — periods ahead (default 12)
- seasonality — optional seasonal period
Spill: forecast mid + lower/upper band columns. Chart a line with forecast bands enabled to shade the 95% interval.
Example: =AX.FORECAST(B2:B120, 12)
AX.OUTLIERS
Signature: AX.OUTLIERS(values, [method])
Flags rows that look anomalous. Spill includes a consensus flag column.
Example: =AX.OUTLIERS(C:C)
AX.REGRESSION
Signature: AX.REGRESSION(y, x1, [x2], …)
Returns a LINEST-style stats table plus diagnostics in the Model tab.
Example: =AX.REGRESSION(D2:D100, B2:B100, C2:C100)
AX.PREDICT (Axon)
Signature: AX.PREDICT(target, features…)
Trains a random forest and spills scored predictions with holdout metrics and feature importance.
Example: =AX.PREDICT(E:E, B:B, C:C, D:D)
AX.CLUSTER (Axon)
Signature: AX.CLUSTER(features…, [k])
K-means with silhouette sweep for k when omitted. Spill: segment labels + centroid table.
Example: =AX.CLUSTER(B:D, 4)
AX.PCA (Axon)
Signature: AX.PCA(features, [n_components])
Principal component analysis on standardized features. When n_components is omitted, components are chosen to reach ~90% variance explained. Spill: one column per component (PC1…PCk).
Example: =AX.PCA(B:E) or =AX.PCA(B:E, 3)
AX.TSNE (Axon)
Signature: AX.TSNE(features, [perplexity])
2D embedding for visualization / clustering prep. Spill: tsne_x, tsne_y per row. Pair with a scatter chart; you can feed the embedding into AX.CLUSTER. Not a named Model-ribbon algorithm — use Group similar rows → DBSCAN (or K-means) when you need durable Apply / rescore.
Example: =AX.TSNE(B:E) or =AX.TSNE(B:E, 30)
Reading the Axon panel
| Tab | Meaning |
|---|---|
| Cleaning | Every preprocessing step (imputation, dropped columns, scaling). Nothing changed silently. |
| Model | Accuracy metrics, summary, feature importance |
| Explain | Plain-language reasons for predictions / segments |
Select the AX result cell to refresh the panel. Re-selecting a cell does not retrain — reports are cached at the worker boundary until inputs change.
Charts: forecast bands
When charting AX.FORECAST output, assign the mid series as the line value and set the tile’s forecast band lower/upper fields. Desk renders a translucent 95% band under the forecast line.
Limits & troubleshooting
| Symptom | What to try |
|---|---|
#ML_LIMIT | Row/feature cap hit (e.g. RF ~100k rows / 200 features). Sample or reduce features. |
#CANCELLED | You cancelled training — re-run the formula when ready. |
#AXON? | Advanced AX.* on a machine without Axon Pro. The formula is kept; activate Desk Pro / Axon Pro entitlement, then recalc. Status bar shows a single passive notice — not an upsell loop. |
#MODEL? | Named-model Predict/Confidence column cannot score — missing artifact, schema drift, or Axon Pro not available. Retrain or re-Apply after fixing features. |
| Apply disabled | Train first — Apply needs holdout metrics in the builder pane. |
| Non-numeric range | AX needs numbers; convert or filter text first. |
| Low accuracy | Check Cleaning tab for dropped columns; add better features; verify target leakage. |
| Locked Predict/Cluster/PCA/t-SNE / Model builder | Activate Desk Pro or a license that lists plugin.com.anthrena.axon. Autocomplete still lists advanced AX.* with a lock glyph. |
| “WASM missing ml_last_report / ml_model_train” | Desk is waiting on an analytics engine rebuild (make deploy-deck in Fluxor + Desk bun run build:worker). |
Long training never freezes the UI — ML runs in a background worker. Progress shows in the Axon panel; use Cancel to stop.