Sha256: 2086e1f089db7f83fa3ab6182aaddad0d56884188f0a75124536e76818462735

Contents?: true

Size: 564 Bytes

Versions: 71

Compression:

Stored size: 564 Bytes

Contents

tryCatch({
  library(AnomalyDetection)

  args <- commandArgs(trailingOnly = TRUE)

  con <- textConnection(args[2])
  data <- read.csv(con, stringsAsFactors = FALSE)
  data$timestamp <- as.POSIXct(data$timestamp)

  if (identical(args[1], "ts")) {
    res <- AnomalyDetectionTs(data, direction = "both", alpha = 0.05, max_anoms = 0.2)
  } else {
    res <- AnomalyDetectionVec(data$count, direction = "both", alpha = 0.05, max_anoms = 0.2, period = length(data$count) / 2 - 1)
  }

  write.csv(res$anoms)
}, error = function (e) {
  write.csv(geterrmessage())
})

Version data entries

71 entries across 71 versions & 3 rubygems

Version Path
blazer-2.4.0 lib/blazer/detect_anomalies.R
blazer-2.3.1 lib/blazer/detect_anomalies.R
blazer-2.3.0 lib/blazer/detect_anomalies.R
blazer-2.2.8 lib/blazer/detect_anomalies.R
blazer-2.2.7 lib/blazer/detect_anomalies.R
blazer-2.2.6 lib/blazer/detect_anomalies.R
blazer-2.2.5 lib/blazer/detect_anomalies.R
blazer-2.2.4 lib/blazer/detect_anomalies.R
blazer-2.2.3 lib/blazer/detect_anomalies.R
sql-jarvis-2.1.5 lib/blazer/detect_anomalies.R
blazer-2.2.2 lib/blazer/detect_anomalies.R
sql-jarvis-2.1.4 lib/blazer/detect_anomalies.R
sql-jarvis-2.1.3 lib/blazer/detect_anomalies.R
sql-jarvis-2.1.2 lib/blazer/detect_anomalies.R
blazer-2.2.1 lib/blazer/detect_anomalies.R
sql-jarvis-2.1.1 lib/blazer/detect_anomalies.R
blazer-2.2.0 lib/blazer/detect_anomalies.R
blazer-2.1.0 lib/blazer/detect_anomalies.R
sql-jarvis-2.1 lib/blazer/detect_anomalies.R
sql-jarvis-2.0.9 lib/blazer/detect_anomalies.R