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

Add support for exogenous variables to ARIMA #4221

Merged
merged 66 commits into from
Nov 18, 2021

Conversation

Nyrio
Copy link
Contributor

@Nyrio Nyrio commented Sep 22, 2021

Closes #3846

Adds support for exogenous variables to ARIMA.
All series in the batch must have the same number of exogenous variables, and exogenous variables are not shared across the batch (exog therefore has n_exog * batch_size columns).

Example:

model = ARIMA(endog=df_endog, exog=df_exog_past, order=(1,0,1),
              seasonal_order=(1,1,1,12), fit_intercept=True,
              simple_differencing=False)
model.fit()
fc, lower, upper = model.forecast(40, exog=df_exog_future, level=0.95)

2021-09-22_exog_fc

Nyrio added 30 commits June 16, 2021 05:41
@github-actions github-actions bot removed conda conda issue CMake labels Nov 2, 2021
@ajschmidt8
Copy link
Member

Please consider using GitHub's Draft PR feature instead of WIP tags in the future. Draft PRs have the benefit of preventing notifications to codeowners until PRs are marked Ready for Review.

Some useful information about Draft PRs:

@Nyrio Nyrio changed the title [WIP] Add support for exogenous variables to ARIMA Add support for exogenous variables to ARIMA Nov 2, 2021
@Nyrio
Copy link
Contributor Author

Nyrio commented Nov 2, 2021

@tfeher Thanks for the review. I've made some changes and also added a section to the ARIMA notebook (you might want to have a quick look at this).

Copy link
Contributor

@tfeher tfeher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Nyrio for fixing the issues. I still need to have a look at the notebook, but otherwise it looks good to me. Pre-approving.

@Nyrio
Copy link
Contributor Author

Nyrio commented Nov 15, 2021

@rapidsai/cuml-python-codeowners for required approval of the Python side of the change.

@Nyrio Nyrio added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currenty a work in progress labels Nov 15, 2021
@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (branch-21.12@b5f119e). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##             branch-21.12    #4221   +/-   ##
===============================================
  Coverage                ?   86.01%           
===============================================
  Files                   ?      231           
  Lines                   ?    18838           
  Branches                ?        0           
===============================================
  Hits                    ?    16204           
  Misses                  ?     2634           
  Partials                ?        0           
Flag Coverage Δ
dask 46.87% <0.00%> (?)
non-dask 78.73% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b5f119e...ed6a4d7. Read the comment docs.

@tfeher
Copy link
Contributor

tfeher commented Nov 16, 2021

@Nyrio I had a look at the notebook and the new exogenous variables section looks good to me.

Copy link
Contributor

@tfeher tfeher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Nyrio Just a small thing with the docstring.

cpp/include/cuml/tsa/batched_arima.hpp Show resolved Hide resolved
@tfeher
Copy link
Contributor

tfeher commented Nov 17, 2021

Memory errors in test are tracked in #4370

@tfeher
Copy link
Contributor

tfeher commented Nov 17, 2021

The memory error should be fixed by the last commit.

@Nyrio
Copy link
Contributor Author

Nyrio commented Nov 17, 2021

Thanks @tfeher ! I completely missed that but it makes sense now.

@dantegd
Copy link
Member

dantegd commented Nov 18, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit da08636 into rapidsai:branch-21.12 Nov 18, 2021
vimarsh6739 pushed a commit to vimarsh6739/cuml that referenced this pull request Oct 9, 2023
Closes rapidsai#3846 

Adds support for exogenous variables to ARIMA.
All series in the batch must have the same number of exogenous variables, and exogenous variables are not shared across the batch (`exog` therefore has `n_exog * batch_size` columns).

Example:
```python
model = ARIMA(endog=df_endog, exog=df_exog_past, order=(1,0,1),
              seasonal_order=(1,1,1,12), fit_intercept=True,
              simple_differencing=False)
model.fit()
fc, lower, upper = model.forecast(40, exog=df_exog_future, level=0.95)
```

![2021-09-22_exog_fc](https://user-images.githubusercontent.com/17441062/134339807-f815a7a3-98dc-49e5-8599-9607e660597a.png)

Authors:
  - Louis Sugy (https://github.com/Nyrio)
  - Tamas Bela Feher (https://github.com/tfeher)

Approvers:
  - AJ Schmidt (https://github.com/ajschmidt8)
  - Tamas Bela Feher (https://github.com/tfeher)
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#4221
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team CUDA / C++ CUDA issue CUDA/C++ Cython / Python Cython or Python issue feature request New feature or request non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Support exogenous variables in ARIMA model
5 participants