I have trained an ARIMA model on some 15 minute incremented time series data by using the statsmodels library. I would like to determine how anomalous the next 15 minute increment's data I observe is. I would then like to update the model with that data.
I can predict the range of future outcomes within an accepted error margin like so:
model = arima_model.ARIMA(data.COUNTS,(p,d,q)).fit() print model.forecast(alpha=.001)
array([[ 16.13395152, 48.47024783]]))
So you could say any number outside that range is anomalous. However, if my next observation were, for example, 50 that would presumably be less anomalous than an observation of 51. Which way do you recommend I use to determine exactly how anomalous an observation is using an ARIMA model?
Also, how should I go about updating my model with the new observation?