library(daltoolbox)
library(tspredit)
#loading the example database
data(examples_anomalies)
#Using simple example
dataset <- examples_anomalies$simple
head(dataset)
# setting up time series regression model
model <- hanr_ml(tspredit::ts_elm(tspredit::ts_norm_gminmax(),
input_size=4, nhid=3, actfun="purelin"))
# fitting the model
model <- daltoolbox::fit(model, dataset$serie)
detection <- detect(model, dataset$serie)
# filtering detected events
print(detection[(detection$event),])
Run the code above in your browser using DataLab