Fit incident hawkes process
Estimate incident aftershock dynamics with a stationary exponential Hawkes process and conditionally simulate near-term incident counts.
What it's for
Incidents arrive in clusters, because one incident makes the next more likely. This estimates that aftershock effect and projects near-term incident load from it.
Adds an incident-contagion model that separates background risk from endogenous aftershocks and forecasts cluster persistence.
What you give it
Inputs split into evidence read from your connected systems, calibration your team owns, and numerical controls that affect precision but never the result's meaning.
| Field | Type | Role | Required |
|---|---|---|---|
| events | array of objects (2 fields) ≥ 10 items | Evidence | Yes |
| forecast_horizon_days | number > 0 | Your calibration | Yes |
| forecast_simulations | integer ≥ 100 | Your calibration | Optional |
| observation_end_days | number | Your calibration | Yes |
| observation_start_days | number | Your calibration | Yes |
| seed | integer | Numerical control | Optional |
Each events
record
| Field | Type | Required |
|---|---|---|
| id | string (non-empty) | Yes |
| timestamp_days | number | Yes |
{
"events": [
{
"id": "incident-0",
"timestamp_days": 1
},
{
"id": "incident-1",
"timestamp_days": 1.1
},
{
"id": "incident-2",
"timestamp_days": 1.2
},
{
"id": "incident-3",
"timestamp_days": 8
},
{
"id": "incident-4",
"timestamp_days": 8.1
},
{
"id": "incident-5",
"timestamp_days": 8.2
},
{
"id": "incident-6",
"timestamp_days": 15
},
{
"id": "incident-7",
"timestamp_days": 15.1
},
{
"id": "incident-8",
"timestamp_days": 15.2
},
{
"id": "incident-9",
"timestamp_days": 22
},
{
"id": "incident-10", Truncated for display — the full payload is 57 lines.
What you get back
This is the actual output of running the example above — computed by the same function the platform calls, not an illustration.
{
"fit": {
"converged": true,
"events": 12,
"iterations": 6,
"log_likelihood": -11.17,
"time_rescaling_ks_p_value": 0.1255,
"time_rescaling_ks_statistic": 0.3396
},
"forecast": {
"horizon_days": 7,
"incident_count": {
"mean": 3.44,
"p10": 0,
"p50": 2,
"p90": 9.1
},
"probability_at_least_one": 0.7,
"simulations": 100
},
"interpretation": "The branching ratio is an estimated aftershock share, not proof that any particular incident caused another.",
"method": "exponential_hawkes_em_forecast_v1",
"model_comparison": {
"hawkes_aic": 28.34,
"hawkes_preferred_by_aic": true,
"poisson_aic": 47.991,
"poisson_minus_hawkes_aic": 19.6509
},
"parameters": {
"background_rate_per_day": 0.147095,
"branching_ratio": 0.632263,
"estimated_endogenous_fraction": 0.6323,
"excitation_decay_per_day": 8.364362,
"excitation_half_life_days": 0.0829,
"stationary_incident_rate_per_day": 0.4
},
"warnings": [
"Fewer than 30 incidents; Hawkes parameters are weakly identified."
]
} How it works
Simulation & stress testing — Run the system forward many times to see what the bad tail actually looks like.
- 1 Estimate incident aftershock dynamics with a stationary exponential Hawkes process and conditionally simulate near-term incident counts.
- 2 Evaluate the method-specific diagnostics and gates returned by the function, then abstain unless the declared decision clears them under locally governed thresholds.
Before you trust it
Every tool in the catalog ships with the conditions under which its answer is meaningful — and the conditions under which it should abstain instead of guessing.
Assumptions & guardrails
- The scenario generator preserves relevant dependencies, tail behavior, feedback, and constraints rather than varying inputs independently for convenience.
- Simulation quantifies consequences under the encoded world model; it cannot validate assumptions omitted from that model.
Minimum evidence
- events: at least 10 rows/items
- observation_start_days: required and organization-defined
- observation_end_days: required and organization-defined
- forecast_horizon_days: required and organization-defined
How to validate it
Validate on future periods or held-out aggregate units, compare with a simple baseline, and require stability across plausible metric definitions and decision thresholds.
Calibrating it to your org
Same for everyone
The mathematical kernel, validation rules, method version, and JSON output semantics are organization-independent; no tenant-trained coefficients or company benchmark is embedded in the function.
Specific to you
- metric/outcome definitions, entity grain, observation window, costs, thresholds, priors, and constraints represented by the function inputs
Calibration workflow
- 1 Define the management decision, target outcome, aggregate unit, privacy boundary, cadence, and prediction/intervention horizon for this organization.
- 2 Build a tenant-scoped historical cohort using only information available before each prediction or decision; preserve zero periods, censoring, assignment probabilities, and unresolved outcomes when the method requires them.
- 3 Estimate statistical parameters on training history, but obtain costs, utilities, risk tolerance, practical-effect thresholds, capacity, and policy constraints from accountable decision owners.
- 4 Validate on later time windows or held-out aggregate units at the deployment grain, against a simple baseline and the function-specific validation strategy.
- 5 Deploy only if the returned decision clears evidence, overlap, calibration, robustness, and guardrail checks; warning, unsupported, schema-gap, and fallback decisions are abstentions.
- 6 Monitor realized outcomes, data drift, coverage, and decision regret; recalibrate at a governed cadence or after a detected regime/definition change, never merely because a stakeholder dislikes the result.
Call it from your AI
You don't wire up 388 tools in your MCP client. The GitRevio MCP server exposes 18 tools, three of which let an agent search the catalog, read a tool's schema, and run it — so the assistant finds this one on its own.
gitrevio_capabilities_search
{ "q": "estimate incident aftershock dynamics with a" }
→ finds "fit_incident_hawkes_process"
gitrevio_capability_describe
{ "capability_id": "fit_incident_hawkes_process" }
→ returns the input schema and agent guidance shown on this page
gitrevio_capability_run
{ "capability_id": "fit_incident_hawkes_process", "arguments": { ... } }
→ returns the result shown above Works in Claude Desktop, Claude Code, Cursor, Cline, Continue.dev, Goose and Aider. See the MCP server.
Related tools
Optimize global review assignment
Assign an entire review portfolio globally under expertise, conflict, capacity, urgency, quality, independence, and load-balance constraints.
Simulate dependency cascade risk
Stress-test correlated baseline failures and directed dependency cascades with portfolio loss VaR/CVaR and risk contributions.
Audit CI pipeline evidence integrity
Audit the complete point-in-time change-to-pipeline-to-job-to-rerun cohort, exposing missing CI, orphan records, future leakage, inconsistent required-job outcomes, incomplete provider evidence and same-configuration fail-then-pass flake proxies without scoring people.
Audit incident learning evidence integrity
Audit the complete point-in-time incident-to-postmortem-to-corrective-action lineage, separating missing or contradictory evidence from genuine overdue learning debt without attributing individual fault.
Audit operational alert decision integrity
Audit every point-in-time operational alert evaluation by recomputing fire/suppress decisions and verifying effective policy, cooldown, evidence freshness, context, controls, severity routing, acknowledgement, action and mature outcome lineage.
Audit root cause traceback evidence integrity
Audit whether an anomaly traceback is complete, point-in-time, multiplicity-controlled and honestly labeled as temporal or causal, including every upstream candidate, path lag, edge identification basis and later root-recovery validation.