Question

I'm trying to detect anomalies from training data.

First, I train a model according to a given time series using the forecast package:

train <- forecast(ts(sin((2*pi)*seq(from=0,to=10,by=0.01)),frequency=100))

Then, once I get new time series i try seeing how well they fit the trained data, and by that finding anomalies.

Currently I'm using the accuracy function which doesn't seem to be the right tool for the job:

test <- ts(sin((2*pi)*seq(from=0,to=20,by=0.01))+sin((3*pi)*seq(from=0,to=20,by=0.01)),frequency=100)accuracy(train,test)

accuracy(train,test)

I also thought of somehow analyzing the residuals of the new dataset according to the trained model.

Does anyone have any good ideas as to how to optimize this task?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top