Closed Oumaima-Boumlik closed 4 years ago
This probably isn't a problem. Basically what is happening is during model fitting, there are several conditions that will terminate the optimization. One is that the gradient goes to 0, indicating convergence to a local optimum. But there is also a max number of iterations at which it will terminate. For some datasets, the likelihood surface is very flat around the optimum, so the optimizer can slow down and take a lot of iterations, and in this case, reach the max before the gradient has gone all the way to 0. But I'd expect that the parameter fits to still be good. Changing the data will change the optimizer surface, and so change the optimizer behavior.
To be sure, you could try changing the optimizer to Stan's Newton optimizer (default is L-BFGS) and see if that makes much difference in the forecast:
model.fit(group, algorithm='Newton')
Hi everyone! I am using a small data set (2400 row) and try to forecast values for each group of time series based on a groupby (col_resolution), I had the warning of "Maximum number of iterations hit, may not be at an optima " I thought that it depends on the number of changepoints but strangely using the same dataset and changing the column 'tot' as ints instead of floats, it works perfectly. here is my function:
` def fit_predict_model(group):
datatest_floats.txt I'm confused about the origin of this problem, could you please guide me?