knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

tdpcaTEP

An R package containing all code to reproduce the TEP data results in the paper "Online Detection of Sparse Changes in High-Dimensional Data Streams Using Tailored Projections". In addition, the package contains the files with the results we obtained in the directories /results and /thresholds. It is also an aim that this package can be used by others who want to test TDPCA for their monitoring tasks, both for bootstrapping thresholds and testing performance in terms of expected detection delays (EDD).

Overview

Functionality:

Installation

The associated Tennessee Eastman Process data are too large to upload here and into the package, so it has to be downloaded manually.

  1. Go to https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/6C3JR1
  2. Download the files TEP_FaultFree_Training.RData and TEP_FaultFree_Training.RData.
  3. Place these files in your working directory.

After having downloaded the data, you can install tdpcaTEP from github and load the data with:

# install.packages("devtools")
devtools::install_github("Tveten/tdpcaTEP")
library(tdpcaTEP)
load_TEP_data_globally()

To reproduce figures from our result files, download the folders /results and /thresholds from https://github.com/Tveten/tdpcaTEP and put them in your working directory before running the plot functions.

Exported and documented functions

For more information, see the documentation of the functions below inside R.

The documentation in tpcaMonitoring is helpful to understand the internal functions used in the functions above, as they are more or less the same.

Example

library(tdpcaTEP)
# To run the entire TEP study, use run_TEP_sim().
# It will take a day or two on a regular computer, but the output from it is also contained in
# this package so that one can still get plots of results and study the results in more detail.
# Before running this example code, downloaded
# the results/ and thresholds/ directories from https://github.com/Tveten/tdpcaTEP
# and put them in your working directory.
# The code in run_TEP_sim() specifies in a simple way the simulation
# setup and the necessary steps in the study.

lag <- 5
fault_nr <- 15

# rl_density(lag, fault_nr)
TEP_summary(lag, fault_nr, sort_by = 'edd')

pfa_edd_table()


Tveten/tdpcaTEP documentation built on June 4, 2019, 8:49 a.m.