Models / gradient-boosted-ensemble

Safety Car Probability

P(a Safety Car or Virtual Safety Car next lap), one value for the whole field.

gradient-boosted-ensembleanalytics.strategy

How it works

A gradient-boosted classifier scores the race as a whole once per lap. It reads the last lap that at least half the field has completed — track status, how far into the race it is, how spread out the field is, recent incidents and current session weather — and publishes the probability of a Safety Car or Virtual Safety Car on the following lap. The same number is sent for every driver. The model's output also feeds a strategy-leverage readout that is only high when a caution is likely and the field's tyres are worn at the same time.

When to use it

  • Time a pit-strategy decision: a stop under caution costs less, so a rising probability changes how aggressive a strategy should be.
  • Reprice live markets that depend on a neutralisation — whether a VSC or Safety Car appears, and what happens to prices after one.
  • Explain to an audience why a leader's margin is not safe: the same value is used as the caution input to the winning-margin feed's collapse risk.

Inputs

  • track status
  • lap fraction
  • field spread
  • recent incidents
  • session weather

Output

raceState.pSafetyCarP(any SC or VSC active on the next lap), 0–1. One value for the field. Same as raceState.scProbabilityNextLap.
raceState.scProbabilitySettleP(an actual safety car on the next lap), 0–1. Sportsbook settlement basis: VSC and red flag are not counted.
raceState.scProbabilityNext5P(at least one SC or VSC lap in the next 5 laps), 0–1. The same model rolled forward over the next five laps.
raceState.strategyLeverageleverage (0–1), inPocket, leaning (aggressive | neutral) and a note. Present only when pSafetyCar is. High only when both caution risk and field tyre degradation are elevated.

Example payload

An excerpt of one analytics.strategy delivery, trimmed to the fields this model produces. Values are illustrative. The full message shape is on the feed reference.

json
{
  "feed": "analytics.strategy",
  "lap": 35,
  "raceState": {
    "pSafetyCar": 0.09,
    "strategyLeverage": {
      "leverage": 0.42,
      "inPocket": false,
      "leaning": "neutral"
    }
  }
}

Use it

Subscribe to analytics.strategy with a webhook and read this model's fields from each delivery:

bash
curl -X POST https://api.racehooks.io/v1/webhooks \
  -H "Authorization: Bearer $RACEHOOKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"webhookUrl":"https://your-app.com/f1","feedId":"analytics.strategy"}'

To try it without waiting for a race weekend, replay the recorded Canadian Grand Prix (2026-canada_r) from the quickstart.

How to read it

pSafetyCar is a next-lap rate for the whole race, so small numbers are normal on a green lap. Read it as relative risk: compare it with earlier laps of the same race. A jump usually means the track is already partly neutralised or an incident has just happened. strategyLeverage is the readout to use for pit decisions, because it combines the caution chance with how worn the field's tyres are — a caution only creates an opportunity when there is a stop worth making.

Limitations

  • VSC and full Safety Car are combined into one probability; the split between them is not published.
  • Most of the signal comes from whether the track is already being neutralised. Predicting a brand-new caution from a clean green lap is the hardest case.
  • Weather is read from the current session conditions, not a lap-by-lap rain forecast.
  • Published in Race and Sprint sessions only, never pre-race.

Calibration

The served probability is calibrated, so it can be read as a chance per lap. See the calibration reference for the shared pipeline.

FAQ

Does the Safety Car model separate a VSC from a full Safety Car?

Not in the served feed. raceState.pSafetyCar is the probability of either on the next lap.

Why is the value the same for every driver?

A Safety Car neutralises the whole race, so the model scores the race once per lap and publishes that single value in raceState.

Related models

  • Pit Stop Prediction — Probability of a green-flag pit stop on the next lap; stops under safety car, VSC or red flag are not counted.
  • DNF Risk — P(this driver retires before the flag, given still running), per lap.
  • Pit Window Survival — How much longer each driver's current stint is likely to run.

Get the data

This model is delivered on analytics.strategy. Subscribe by webhook or stream it over SSE. The quickstart walks through registering an endpoint and replaying a past session against it.