View source: R/han_autoencoder.R
| han_autoencoder | R Documentation |
Trains an encoder-decoder (autoencoder) to reconstruct sliding windows of the series; large reconstruction errors indicate anomalies.
han_autoencoder(input_size, encode_size, encoderclass = autoenc_base_ed, ...)
input_size |
Integer. Input (and output) window size for the autoencoder. |
encode_size |
Integer. Size of the encoded (bottleneck) representation. |
encoderclass |
DALToolbox encoder-decoder constructor to instantiate. |
... |
Additional arguments forwarded to |
han_autoencoder object
Sakurada M, Yairi T (2014). Anomaly Detection Using Autoencoders with Nonlinear Dimensionality Reduction. MLSDA 2014.
library(daltoolbox)
library(tspredit)
# Load anomaly example data
data(examples_anomalies)
# Use a simple example
dataset <- examples_anomalies$simple
head(dataset)
# Configure an autoencoder-based anomaly detector
model <- han_autoencoder(input_size = 5, encode_size = 3)
# Fit the model
model <- fit(model, dataset$serie)
# Run detection
detection <- detect(model, dataset$serie)
# Inspect detected anomalies
print(detection[detection$event, ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.