This is the code for the paper "Adaptive Partially-Observed Sequential Change Detection and Isolation". The paper is accepted in Technometrics and the Arxiv version is provided here.
- srpabstract.py: A class that do SRP statistics
- Initialization:
- p: Number of dimensions
- c: scale vector, Target meanshift is c * M
- k: Number of failuer Mode
- M: Failure Mode Mean Matrix of k failure modes: p * k
- nsensors: number of selected sensors
- Ks: Number of selected failure mode
- L: control limit, set to -1 if not initialized yet.
You need to override the following functions
compute_log_LRT
: Compute the log liklihood ratio,compute_index
: Compute the index function to decide the best sensing allocation
Other implemented method:
compute_monitoring_statistics
: Computed SRP statistics using the Top-R rulescompute_monitor_batch
: Compute the monitoring results for batch of samples
- TSSRP.py: Implement original TSSRP method
-
srpabstract initialization except
- mode: which testing statistics to use, Default to
T2
- mode: which testing statistics to use, Default to
-
compute_index: Sensor index becomes the failure mode index
-
srpabstract initialization except
- mode: which testing statistics to use, Default to
T2
- mode: which testing statistics to use, Default to
-
compute_index
- Mode
T2
Default, using summation of log SRP. - Mode
T1
, using summation of SRP, no closed forms and using greedy algorithm - Mode
T1_Max
, using summation of SRP, no closed formsusing Max approximation
- Mode
- spc.py: A generic class for process monitoring using simulation
-
Initialization:
monitor_statistics
: given input of n_batch * Tmax * dimensions, return the monitoring statistics of size n_batch * Tmax denotedata_gen_func0
: Generate normal samples, return n_batch * Tmax * dimensionsdata_gen_func1
: Generate abnormal samples, return n_batch * Tmax * dimensions
-
phase1
:- Generate iterations (= number of seeds) of each data with n_batch size
- Use Binary search to find the control limit
L
where theARL0
is fixed
-
phase2
:- Generate iterations (= number of seeds) of each data with n_batch size
- Return ARL1
There are three datasets that used in the paper:
- The dataset is offered in temperature.mat. Thermal imaging monitoring of 3D printing: The dataset used is publically available at figshare Scenario 3. data
- Tonnage dataset, which is offered in tonnage.mat.
- COVID-19 monitoring of different counties in WA. The dataset is derived from the JHU. The WA dataset used in the paper has been also stored in Infection rate.