Skip to main content
Version: 0.0.1-beta.5

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.

Screenshot: Data ribbon Machine Learning group + Axon panel

Quick start (2 minutes)

  1. Open a datasheet with numeric columns (or use a sample workbook).
  2. Select a value range (for example a Revenue column).
  3. On the Data ribbon, use the Machine Learning buttons:
    • Forecast → inserts =AX.FORECAST(…)
    • Outliers → inserts =AX.OUTLIERS(…)
    • Regression → inserts =AX.REGRESSION(…)
  4. Confirm the range in the insert dialog and click Insert.
  5. 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

CapabilityPlanWhat it does
AX.FORECASTFree (Axon Core)Forecast with 95% confidence bands
AX.OUTLIERSFree (Axon Core)Flag anomalies (IQR + isolation consensus)
AX.REGRESSIONFree (Axon Core)OLS stats table (coef, t, p, CI)
AX.PREDICTAxon Pro / Desk Pro (ml.advanced)One-shot random-forest predict + importance
AX.CLUSTERAxon Pro / Desk Pro (ml.advanced)K-means segments + silhouette
AX.PCAAxon Pro / Desk Pro (ml.advanced)Principal components + loadings
AX.TSNEAxon Pro / Desk Pro (ml.advanced)2D t-SNE embedding
Model ribbon builderAxon 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.

  1. Open a datasheet and switch to the Model ribbon.
  2. Keep Semantic model (Relationships / measures) as today.
  3. 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.
  4. Choose a Task: Predict a category, Predict a number, Group similar rows, Forecast over time, Flag anomalies, or Rank by relevance.
  5. 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)
  6. 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.
  7. 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.
  8. 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.
  9. Apply:
    • Category — adds MODEL.PREDICT + MODEL.CONFIDENCE
    • Number / clustering — adds MODEL.PREDICT only
    • Ranking — adds MODEL.PREDICT (rank, 1 = highest) + MODEL.CONFIDENCE as score
    • Anomaly — adds MODEL.PREDICT (Normal/Anomaly) + MODEL.CONFIDENCE as {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.
  10. 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

TabMeaning
CleaningEvery preprocessing step (imputation, dropped columns, scaling). Nothing changed silently.
ModelAccuracy metrics, summary, feature importance
ExplainPlain-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

SymptomWhat to try
#ML_LIMITRow/feature cap hit (e.g. RF ~100k rows / 200 features). Sample or reduce features.
#CANCELLEDYou 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 disabledTrain first — Apply needs holdout metrics in the builder pane.
Non-numeric rangeAX needs numbers; convert or filter text first.
Low accuracyCheck Cleaning tab for dropped columns; add better features; verify target leakage.
Locked Predict/Cluster/PCA/t-SNE / Model builderActivate 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.