I am fitting an ARIMA/SARIMAX model for a large dataset. When running the code I get the following output on my screen -
RUNNING THE L-BFGS-B CODE
* * *
Machine precision = 2.220D-16
N = 4 M = 10
At X0 0 variables are exactly at the bounds
At iterate 0 f= 5.69245D+00 |proj g|= 1.98922D-01
At iterate 5 f= 5.64524D+00 |proj g|= 3.32004D-03
At iterate 10 f= 5.64521D+00 |proj g|= 1.27724D-03
At iterate 15 f= 5.64389D+00 |proj g|= 2.03358D-02
At iterate 20 f= 5.60506D+00 |proj g|= 4.45951D-02
At iterate 25 f= 5.60207D+00 |proj g|= 5.31460D-04
* * *
Tit = total number of iterations
Tnf = total number of function evaluations
...
4 28 32 1 0 0 1.993D-06 5.602D+00
F = 5.6020645399394908
CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL
This problem is unconstrained.
Since my dataset is quite large and I fit the ARIMA/SARIMAX models iteratively, I get multiple outputs as above which take up quite the screen space.
How do I hide/remove this output?
I tried using model.fit(iprint=-1)
and model.fit(disp=-1)
but I get error when I use either. I guess I am using the latest version of statsmodels
where disc
and iprint
are deprecated. Is there another way to do this without downgrading to an earlier version of the statsmodels library?
My imports are as follows -
from statsmodels.tsa.arima.model import ARIMA
from statsmodels.tsa.statespace.sarimax import SARIMAX