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
Add ARIMARegressor #1894
Add ARIMARegressor #1894
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1894 +/- ##
=========================================
+ Coverage 100.0% 100.0% +0.1%
=========================================
Files 274 276 +2
Lines 22360 22571 +211
=========================================
+ Hits 22354 22565 +211
Misses 6 6
Continue to review full report at Codecov.
|
# Conflicts: # evalml/tests/dependency_update_check/latest_dependency_versions.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the comments left by @freddyaboulton and @bchen1116 , but think once those issues are addressed this is good to go.
evalml/pipelines/components/estimators/regressors/arima_regressor.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some nit-picky comments, but the biggest thing before merge is, I don't think we should be adding this to _all_estimators_used_in_search
?
p_error_msg = "ARIMA is not installed. Please install using `pip install statsmodels`." | ||
arima = import_or_raise("statsmodels.tsa.arima.model", error_msg=p_error_msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this in fit
if we have it in __init__
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We end up using it a few lines below when we initialize the ARIMA model in different ways depending on if X is passed or not :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah what I meant was, is there a case where we catch this in fit
when we didn't catch it in __init__
? Can a user use fit
without init? I'm assuming the use case is:
arima = ARIMARegressor(...) # will catch import error
arima.fit(...) # will we ever catch import error here?
evalml/pipelines/components/estimators/regressors/arima_regressor.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ParthivNaresh Thank you for making the changes! I think we need to make sure Arima is not used in automl search for the time being but other than that this is good to go!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! I like the changes made!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wanted to follow up about needing the import_or_raise statement in fit
but otherwise, looks good to go! Thanks for making the changes, this looks really good 🥳
def __init__(self, date_column=None, trend='n', p=1, d=0, q=0, | ||
random_seed=0, **kwargs): | ||
""" | ||
Arguments: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 👏 👏
p_error_msg = "ARIMA is not installed. Please install using `pip install statsmodels`." | ||
arima = import_or_raise("statsmodels.tsa.arima.model", error_msg=p_error_msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah what I meant was, is there a case where we catch this in fit
when we didn't catch it in __init__
? Can a user use fit
without init? I'm assuming the use case is:
arima = ARIMARegressor(...) # will catch import error
arima.fit(...) # will we ever catch import error here?
@@ -159,7 +159,7 @@ def _get_subclasses(base_class): | |||
'BaselineRegressionPipeline', 'ModeBaselineMulticlassPipeline', 'BaselineMulticlassPipeline', | |||
'TimeSeriesBaselineRegressionPipeline', 'TimeSeriesBaselineBinaryPipeline', | |||
'TimeSeriesBaselineMulticlassPipeline', 'KNeighborsClassifier', | |||
'SVMClassifier', 'SVMRegressor'} | |||
'SVMClassifier', 'SVMRegressor', 'ARIMARegressor'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 👍 👍
Fixes #1498.