cbar: 'cbar' package

Description Usage Arguments Details Examples

Description

cbar: Contextual Bayesian Anomaly Detection in R

This function generates cbar object to detect contextual anomaly and to abstract analysis output.

Usage

1
2
cbar(.data, ref_period, mea_period, apply_standardized = T,
  interval = 0.95, seed = NULL, ...)

Arguments

.data

data table with datetime, y, and predictors

ref_period

performance reference period

mea_period

performance measurement period

apply_standardized

whether it will standardized data or not

interval

credible interval. 0.95 by default.

...

params for bsts_model

Details

See the README on Github

For the input .data, note that you should use datetime for the first column name. Also, you should use numeric type for other columns.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(cbar)

.data <- mtcars
rownames(.data) <- NULL
datetime <- seq(from = Sys.time(), length.out = nrow(.data), by = "mins")
.data <- cbind(datetime = datetime, .data)

ref_session <- 1:16
mea_session <- 17:nrow(.data)

obj <- cbar(.data, ref_session, mea_session)

zedoul/cbar documentation built on May 4, 2019, 10:14 p.m.