statsforecast
statsforecast copied to clipboard
[Models: Automatic BoxCox estimation inside AutoARIMA]
Description
Hello! Thanks for the nice package :)
I was hoping for functionality to the effect of 'automatically estimate box cox lambda parameter from available data'. Note that this is very easy to do using scipy.stats.boxcox:
# df is some pandas dataframe that conforms to your format
import scipy.stats.boxcox as bc
box_cox_lambda_estimated_by_maximum_likelihood = bc(df['y'].values, None)[1]
I suggest this could be done within AutoARIMA, e.g. for a setting of blambda = -1:
AutoARIMA(blambda = -1)
Use case
The above is not easy to pass to the underlying AutoARIMA functionality (as each series would have it's own BoxCox parameter) without breaking parallelism (and potentially cross-validation; if I run boxcox on the whole of data, I cannot pass that to window based cv - I would have to redo the lambda estimation for each window to not leak information about the future).
Thus, this workflow would require a substantial sacrifice for a user to implement, which is why I would like you to consider supporting it (I am happy to supply the PR that implements this).
Thank you for consideration!
I tried to pass blambda=1 as a parameter in AutoARIMA function and it gave the below error:
NotImplementedError: blambda != None
Please suggest whether this function supports box-cox transformation as I see the transformation code is commented out in code.
I receive the same NotImplementedError: blambda != None error when blambda is not None