Run full architecture: denoising, anomaly detection, and clustering
arch.RdApplies the full analysis pipeline to a time series: denoising via seqarima(),
anomaly detection via anomaly(), and clustering of anomalies via run_dbscan().
Arguments
- ts
A time series (`ts`) object.
- params
A list containing configuration parameters. The following fields are supported:
d_max: Differencing order.p_max: AR order.q_max: MA order.fl,fu: Lower and upper cutoff frequencies for band-pass filter.nmax: Maximum number of anomalies to detect (default: 100).scale: IQR multiplier for outlier threshold (default: 1.5).method: Anomaly detection method; one of"iqr"or"gesd".decomp: Optional time decomposition method; one of"stl","twitter", orNULL.eps: Epsilon value for DBSCAN clustering.
Value
A tibble containing:
time, observed: Processed time and signal values.
raw: Original (pre-denoising) signal.
anomaly: Anomaly indicator (1 = anomalous, 0 = normal).
cluster: DBSCAN cluster label (NA for non-anomalous points).
GPS: GPS time stamps.
Examples
if (FALSE) { # \dontrun{
# Generate synthetic time series
fs <- 4096
t <- seq(0, 1, by = 1 / fs)
x <- sin(2 * pi * 60 * t) + rnorm(length(t), sd = 0.5)
ts_obj <- ts(x, start = t[1], frequency = fs)
# Get default parameter set
params <- config_pipe()
# Run full analysis architecture
result <- arch(ts_obj, params)
head(result)
} # }