RL-CoDa: adaptive sampling of compositional streams via ATS-calibrated direct policy search
Description
This repository contains Python source code, and simulation outputs supporting the manuscript “RL-CoDa: adaptive sampling of compositional streams via ATS-calibrated direct policy search.” RL-CoDa combines a deterministic compositional multivariate exponentially weighted moving average (MEWMA) detector with a compact, monotone sampling policy optimized offline using direct policy search. The experiments use synthetic six-part compositional streams generated through Dirichlet-based mechanisms, covering mean shifts, sparse perturbations, variance changes, local mixture disturbances, and gradual drift. Seven monitoring configurations are evaluated, including fixed-interval MEWMA, conventional variable-sampling-interval MEWMA, an optimized score-only policy, a Hotelling-based comparator, an autoencoder, RL-CoDa, and a trend-off ablation. The package includes policy-search histories, calibrated monitoring parameters, calibration checks, per-seed and aggregated results, paired comparisons, measurement-workload statistics, search-budget sensitivity analyses, runtime records, and figures in PNG and PDF formats. Evaluation covers both zero-state and conditional steady-state monitoring, with calibration targeting an in-control average time to signal of 370.4; residual calibration discrepancies are documented in the supplied outputs. The code provides separate modes for policy training and recalibration, evaluation using locked parameters, and a reduced-size pipeline check. Random seeds, dependency information, execution metadata, and source-provenance records are supplied to support reproducibility and further investigation of the trade-off between detection delay and measurement workload.