cluster_bootstrap
Estimate a paired score-difference interval by resampling whole event clusters.
Contract
At least two clusters and 100..100000 replicates are required, capped at 10 million draws. Clusters must be independent under the model. This example intentionally shows a degenerate interval; it is not proof of no uncertainty.
Fields
| Field | Type | Required |
|---|---|---|
cases | array of Case | Yes |
confidence | number | Yes |
op | "cluster_bootstrap" | Yes |
resamples | integer | Yes |
seed | integer | Yes |
This operation needs no existing question or forecast. Use --memory for a calculation-only session.
Request
Send this object on one line. It is expanded below for readability.
{
"version": 1,
"id": "example",
"command": {
"op": "cluster_bootstrap",
"cases": [
{
"question_id": "a",
"cluster_id": "a",
"forecast_at": 1,
"resolved_at": 5,
"model": 0.5,
"baseline": 0.5,
"outcome": true
},
{
"question_id": "b",
"cluster_id": "b",
"forecast_at": 1,
"resolved_at": 5,
"model": 0.5,
"baseline": 0.5,
"outcome": false
}
],
"resamples": 100,
"confidence": 0.95,
"seed": 7
}
}
Response
This response is generated by executing the example against the current binary. Commit timestamps, when present, are shown as <runtime UTC seconds>; the actual protocol returns integer UTC seconds.
{
"version": 1,
"id": "example",
"result": {
"clusters": 2,
"confidence": 0.95,
"degenerate": true,
"difference": 0.0,
"high": 0.0,
"low": 0.0,
"method": "paired_cluster_percentile",
"questions": 2,
"resamples": 100,
"seed": 7,
"standard_error": 0.0
}
}
Verification
The documentation gate executes the setup and request, then checks the following result fields against independently specified expectations:
JSON pointer within result | Expected |
|---|---|
/clusters | 2 |
/low | 0.0 |
/high | 0.0 |
/degenerate | true |
Float comparisons use a 1e-12 tolerance. Request schema validation and cross-record validation still apply. See errors and recovery for failure handling.