On Sun, Apr 26, 2015 at 9:57 AM, Ignacio Gago Padreny <
iga...@gmail.com> wrote:
> Hello,
>
> I am currently involved in a project which involves detecting anomalies. For
> that, after modelling the system the idea is to forecast the next value and
> expect the next value to be very similar as the forecasted one.
>
> For that i am using statsmodels. First i tried to use some datasets from
> pandas, use x13_arima_select_order for obtaining (p,d,q) values and after
> that use tsa.arima_model.ARIMA with those parameters. Well, after that i use
> .fit() for obtaining an ARIMAResult object and use .plot_predict(). I see
> that the forecasted values are very similar to the real ones, which is a
> good sign.
>
> I have some doubts that i would much appreciate being solved. .fit() what
> does exactly do?
.fit() estimates the parameters of the model, by default using maximum
likelihood estimation. If you google for ARIMA estimation, you will
get many results describing this procedure in detail.
> And also, when using ARIMAResult.predict() i get the values
> in the ARIMA model, how can i get them in the original ts range?
> plot_predict() seems to forecast and also do that, but predict() doesn't.
As far as I know, if you specify the model as a Pandas object with a
datetime index, predict should return a Pandas object with the
appropriate datetime index, even when forecasting. Is this not
happening for you? Perhaps you can post the code you're using, and
what you expect to happen.