signaflo / java-timeseries

Time series analysis in Java
MIT License
197 stars 49 forks source link

ArrayIndexOutOfBoundsException #44

Open talasunitish opened 4 years ago

talasunitish commented 4 years ago

We are getting ArrayIndexOutOfBoundsException when using ARIMA model with yearly seasonality (Timeperiod.oneYear()). Is there any minimum number of points for training? (we tried with many different sets of data and always ends up with this error) Here is the stack trace

java.lang.ArrayIndexOutOfBoundsException: -1809947671

at com.github.signaflo.timeseries.model.arima.ArimaKalmanFilter.inclu2(ArimaKalmanFilter.java:331)
at com.github.signaflo.timeseries.model.arima.ArimaKalmanFilter.getInitialStateCovariance(ArimaKalmanFilter.java:273)
at com.github.signaflo.timeseries.model.arima.ArimaKalmanFilter.initializePredictedCovariance(ArimaKalmanFilter.java:167)
at com.github.signaflo.timeseries.model.arima.ArimaKalmanFilter.<init>(ArimaKalmanFilter.java:68)
at com.github.signaflo.timeseries.model.arima.ArimaModel.kalmanFit(ArimaModel.java:288)
at com.github.signaflo.timeseries.model.arima.ArimaModel.access$500(ArimaModel.java:61)
at com.github.signaflo.timeseries.model.arima.ArimaModel$OptimFunction.at(ArimaModel.java:685)
at com.github.signaflo.math.optim.BFGS.<init>(BFGS.java:85)
at com.github.signaflo.timeseries.model.arima.ArimaModel.<init>(ArimaModel.java:126)
at com.github.signaflo.timeseries.model.arima.ArimaModel.<init>(ArimaModel.java:80)
at com.github.signaflo.timeseries.model.arima.Arima.model(Arima.java:64)
at com.yahoo.digits.druid.forecastquery.model.ArimaModel.train(ArimaModel.java:102)
at com.yahoo.digits.druid.forecastquery.model.ArimaModelTest.testArimaModel(ArimaModelTest.java:43)
osmankhalid2005 commented 4 years ago

Minimum points required are 3.

talasunitish commented 4 years ago

We had more than 3 years of training data.