cbar
packagecbar: Contextual Bayesian Anomaly Detection in R
This function generates cbar
object to detect contextual anomaly and
to abstract analysis output.
cbar(.data, ref_period, mea_period, apply_standardized = T, interval = 0.95, ...)
.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 |
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.
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)