The package ships the scripts that reproduce every table, figure and number of the accompanying article. They download the public data, so they are not run when the vignette is built.
Sys.setenv(BP_DATA = "data", BP_OUT = "article-output", BP_CORES = "4",
OPENBLAS_NUM_THREADS = "1")
source(system.file("article", "run_all.R", package = "beatpool"))What each step does
-
01_data.Rcallsdownload_physionet()for the MIT-BIH Arrhythmia Database, the MIT-BIH Supraventricular Arrhythmia Database and the St Petersburg INCART database, andread_database()to segment the first signal (lead II in INCART) into windows of 61, 31 and 43 samples around the annotated R peaks. It also downloads the 49 industry portfolios of the French data library and standardizes them within each year. -
02_heldout.Rleaves out one record at a time, or one patient in INCART, and estimates every operator from the others:pool_spectral(),pool_covariance(),pool_bases(),hierarchical_pool(),energy_moment()withpool_shared(), anddct_basis(). It records the mean per-beat error, the ratio of traces, the rate ofrate_distortion()and the separation of normal and ventricular beats. -
03_summary.Rcomputes paired bootstrap intervals over records or patients and writes the tables andvalues.tex. -
04_figures.Rdraws the figures.
The scripts live in
system.file("article", package = "beatpool").
