Main anomaly detection pipeline for a single detector
pipe.RdThis function processes one batch of time-series data for a single detector using a specified architecture and updates accumulated statistics over batches.
Arguments
- curr_batch
A `ts` object representing the current batch of data.
- prev_batch
A `ts` object from the previous batch; used for boundary-aware processing.
- res.list
A named list containing results so far, typically from `init_pipe()`.
- arch_params
A named list or Rist containing architecture-related parameters:
- arch
Main detection function for the pipeline.
- n_missed
List with `Mh` and `Mt`, specifying how many points to include before and after.
- DQ
Optional. DQ flag to include, e.g., `"BURST_CAT2"`.
- P_update
Optional. Threshold for P0 filtering in update logic.
- verb
Logical; if `TRUE`, prints progress messages.
Value
An updated `res.list` with fields:
- proc
Processed dataframe for the current batch.
- stat
Current batch statistics.
- lamb
Lambda estimates (a, c) after update.
- ustat
Updated cumulative statistics including `last_tcen`.
Details
The pipeline includes:
Concatenating previous and current batches
Running the detection algorithm (`arch`)
Filtering and aligning results with the current batch
Adding DQ flags and computing anomaly statistics
Computing significance probabilities (Poisson, Exponential, P0)
Updating cumulative statistics across batches
Examples
if (FALSE) { # \dontrun{
# Assume you have curr_batch and prev_batch as ts objects
dets <- c("H1", "L1")
arch_params <- config_pipe()
init <- init_pipe(dets = dets)
prev_batch <- init[[1]]
res.net <- init[[2]]
result <- pipe(curr_batch, prev_batch[["H1"]], res.net[["H1"]], arch_params)
} # }