Skip to content

KB / api

GET /api/v1/signals/base-rates/calibration

Last verified

Auto-generated. This article is rebuilt from FastAPI route introspection by scripts/build_api_kb.py. Edit the route docstring in app/ and re-run the script — do not edit this file directly.

GET /api/v1/signals/base-rates/calibration

Handler: app.signals.routes.get_base_rates_calibration
Methods: GET

Description

Realised-vs-forecast accuracy for the pattern matcher.

Returns hit rate, MAE, Brier score, and a decile-bucketed calibration breakdown so the dashboard can surface “this prediction class has been X% accurate over Y similar predictions” alongside the live base-rates card.

Args: horizon: filter to a specific horizon (1, 3, or 5). Omit to return per-horizon + overall. days: lookback window for resolved predictions (default 180). matcher_version: filter by the matcher logic version that produced each prediction. Default = current MATCHER_VERSION so a logic change doesn’t pollute the curve with stale-matcher predictions. Pass matcher_version=all to include every prediction including pre-versioning rows (NULL).

Returns: {by_horizon: {"1": {...}, "3": {...}, "5": {...}}, overall: {sample_size, hit_rate, mean_abs_error, mean_signed_error, brier_score, buckets[]}, matcher_version: str}

Parameters

InNameTypeDefaultDescription
queryhorizonOptional[int]
querydaysint180
querymatcher_versionOptional[str]Filter to a single matcher version. Default: current MATCHER_VERSION. Pass ‘all’ to include legacy NULL-version rows.

Curl

curl -s https://bigclawd.com/api/v1/signals/base-rates/calibration