Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I run a seasonal ARIMA model? #21

Open
alexkokorin2 opened this issue May 24, 2018 · 3 comments
Open

How do I run a seasonal ARIMA model? #21

alexkokorin2 opened this issue May 24, 2018 · 3 comments

Comments

@alexkokorin2
Copy link

alexkokorin2 commented May 24, 2018

I know my (p,d,q)(P,D,Q)_M (seven) coefficients, where should I put them? This library has only 6 coefficients as far as I could see.

This library has a nice sample code in README: https://github.com/Workday/timeseries-forecast

@signaflo
Copy link
Owner

Is M the mean or the seasonal frequencyThanks for the link to that library. It looks like a good one.

Right now the seasonal frequency is computed automatically. The TimeSeries class contains information about the period of time between observations and the Arima interface is where to set the seasonal cycle of the model. For example, the most common use case in the domain I work in is to have a time period of one month for the TimeSeries observations and a seasonal cycle of one year. The seasonal frequency is computed here

As I review this code, I think it might be better to give users the option to set the seasonal frequency explicitly. I think I definitely want to add an Arima builder as well.

@alexkokorin2
Copy link
Author

Seasonal frequency.

@alexkokorin2
Copy link
Author

When I run this code for input: https://pastebin.com/Y1fKKf0d I get extremely flat output (basically 300 of 15 and 420 of 16). Isn't it really strange?

TimeSeries timeSeries = TimeSeries.from(Doubles.toArray(timeseries));
        ArimaOrder modelOrder = ArimaOrder.order(0, 1, 1, 0, 1, 1); // Note that intercept fitting will automatically be turned off
        Arima model = Arima.model(timeSeries, modelOrder);
        // Read forecast values

        Forecast forecast = model.forecast(forecastSize); // To specify the alpha significance level, add it as a second argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants