cbar {cbar}R Documentation

cbar package

Description

cbar: Contextual Bayesian Anomaly Detection in R

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

Usage

cbar(.data, ref_period, mea_period, apply_standardized = T, interval = 0.95,
  ...)

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

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)

[Package cbar version 0.1.3 Index]