Pyramid库auto_arima外生变量添加及Python2.7兼容性问询
Hey there! Glad to hear you're excited about using the Python counterpart to R's auto.arima—let's break down your questions clearly:
Adding Exogenous Variables
You’re totally on the right path! Just like R’s auto.arima uses the xreg parameter to include external predictors, the Pyramid ARIMA library uses the exogeneous parameter (note the British English spelling here) to do the exact same thing.
Your discovered solution is correct, and here’s how it maps to your R workflow:
R Version (with xreg)
auto.arima(df, xreg=pred_df)
Python Version (with exogeneous)
from pyramid.arima import auto_arima auto_arima(df, exogeneous=pred_df)
This will integrate your external variables into the model training process, just as you’re accustomed to in R.
Python 2.7 Support
Yes, the original Pyramid ARIMA library did support Python 2.7 in its earlier releases. That said, it’s critical to note that Python 2.7 reached end-of-life back in 2020—meaning it no longer gets security updates or bug fixes. If you’re stuck on Python 2.7, you might run into compatibility snags with newer versions of dependent libraries. Whenever possible, upgrading to a supported Python version (like 3.7+) is strongly recommended for better stability and access to the latest features.
内容的提问来源于stack exchange,提问作者user3476463

