Python SciPy - obtain minimum AIC for SARIMAX -


i trying obtain p , q parameters aic quotient of seasonal arima function minimum, using scipy brute. p & q taking values in range 0-2 , simplicity, fixed d , d below.

the code is:

def objfunc(grid):     p, q = grid     mod = sm.tsa.statespace.sarimax(timeseries,order=(p,0,q),         seasonal_order=(p,1,q,12),         enforce_stationarity=false,         enforce_invertibility=false)     results = mod.fit()     return results.aic;  grid = (slice(1, 3, 1),slice(1, 3, 1)) solution = brute(objfunc, grid, finish=none,full_output = true) 

i error:

typeerror: object of type 'numpy.int32' has no len(). sarimax function generates errors p&q values not sure how fix it. please help.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -