Expand description
Cold-start bootstrap: warm a detector from historical data before exposing it to live traffic.
A freshly-built crate::RandomCutForest or
crate::ThresholdedForest has an empty reservoir and (for the
thresholded variant) an EMA of the anomaly-score stream with zero
observations. Real scoring only becomes meaningful once the
detector has seen enough points to populate the reservoir and
converge the adaptive threshold. In a production streaming agent
this warmup window is a coverage hole at every restart — unless
the caller can replay a slice of recent history (from a TSDB,
Kafka topic, S3 parquet dump…) before going live.
RandomCutForest::bootstrap, ThresholdedForest::bootstrap
and crate::TenantForestPool::bootstrap accept any
IntoIterator of [f64; D] points and ingest them through the
normal update / process path, returning a BootstrapReport
so the caller can confirm the detector is hot (observations past
the configured warmup window, threshold above the floor).
Points containing non-finite components (NaN, ±∞) are
skipped and tallied in the report rather than aborting the
whole bootstrap — historical TSDB query results routinely contain
gaps, and a single bad row should not sink the restart.
Structs§
- Bootstrap
Report - Summary of a bootstrap replay — what went in, what was filtered out, and where the detector’s warmup stands afterwards.