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

save or access auto_arima trace history? #64

Closed
galenwilkerson opened this issue Dec 10, 2018 · 2 comments
Closed

save or access auto_arima trace history? #64

galenwilkerson opened this issue Dec 10, 2018 · 2 comments

Comments

@galenwilkerson
Copy link

Hi,

I can't quite see if this exists, seems not. It would be nice to be able to save or access the output of the auto_arima trace (since it contains BIC, AIC information for other candidate models)...

I.e. this information:

Fit ARIMA: order=(2, 1, 2) seasonal_order=(1, 0, 1, 52); AIC=4650.194, BIC=4678.269, Fit time=12.474 seconds
Fit ARIMA: order=(0, 1, 0) seasonal_order=(0, 0, 0, 52); AIC=4679.831, BIC=4686.850, Fit time=0.023 seconds
Fit ARIMA: order=(1, 1, 0) seasonal_order=(1, 0, 0, 52); AIC=4671.975, BIC=4686.013, Fit time=0.932 seconds
Fit ARIMA: order=(0, 1, 1) seasonal_order=(0, 0, 1, 52); AIC=4672.122, BIC=4686.160, Fit time=1.123 seconds
Fit ARIMA: order=(2, 1, 2) seasonal_order=(0, 0, 1, 52); AIC=4649.877, BIC=4674.443, Fit time=9.644 seconds
Fit ARIMA: order=(2, 1, 2) seasonal_order=(0, 0, 0, 52); AIC=4659.435, BIC=4680.491, Fit time=0.794 seconds
Fit ARIMA: order=(2, 1, 2) seasonal_order=(0, 0, 2, 52); AIC=nan, BIC=nan, Fit time=nan seconds
Fit ARIMA: order=(2, 1, 2) seasonal_order=(1, 0, 2, 52); AIC=nan, BIC=nan, Fit time=nan seconds
Fit ARIMA: order=(1, 1, 2) seasonal_order=(0, 0, 1, 52); AIC=4650.274, BIC=4671.330, Fit time=10.117 seconds
Fit ARIMA: order=(3, 1, 2) seasonal_order=(0, 0, 1, 52); AIC=nan, BIC=nan, Fit time=nan seconds
Fit ARIMA: order=(2, 1, 1) seasonal_order=(0, 0, 1, 52); AIC=4650.687, BIC=4671.743, Fit time=15.710 seconds
Fit ARIMA: order=(2, 1, 3) seasonal_order=(0, 0, 1, 52); AIC=4652.046, BIC=4680.121, Fit time=23.327 seconds
Fit ARIMA: order=(1, 1, 1) seasonal_order=(0, 0, 1, 52); AIC=4650.386, BIC=4667.933, Fit time=5.807 seconds
Fit ARIMA: order=(3, 1, 3) seasonal_order=(0, 0, 1, 52); AIC=4652.556, BIC=4684.140, Fit time=21.198 seconds
Total fit time: 101.177 seconds

Is this possible?

thanks!
best,

@tgsmith61591
Copy link
Member

tgsmith61591 commented Dec 10, 2018

If it's solely the output you want, you could always do something like this:

import sys

orig_stdout = sys.stdout
f = open('out.txt', 'w')
sys.stdout = f

# fit your model
model = pm.auto_arima(...)

sys.stdout = orig_stdout
f.close()

However if there are other model attributes you might like to save, you can set return_valid_fits=True and you'll get back a list of the models from which you can access other stats

@galenwilkerson
Copy link
Author

galenwilkerson commented Dec 10, 2018 via email

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

No branches or pull requests

2 participants