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

Improve description for ARIMA parameters (p, q, seasonal_orders and trend) #2142

Merged
merged 15 commits into from
Feb 16, 2024

Conversation

MarcBresson
Copy link
Contributor

Summary

It provides more context to some features that are available in statsmodels but were not mentionned in Darts documentation.

Other Information

See statsmodels/statsmodels#9065 that

@MarcBresson
Copy link
Contributor Author

Black has nothing to reformat but gradle still fails.

Screenshot 2024-01-16 at 15 09 50

@dennisbader
Copy link
Collaborator

dennisbader commented Jan 17, 2024

Hi @MarcBresson, simply run black like below (we don't use line length 120)

black darts/models/forecasting.arima.py

@dennisbader
Copy link
Collaborator

@MarcBresson , now isort is complaining. I suggest installing the pre-commit hook for automatic lint/reformatting as described here

@MarcBresson
Copy link
Contributor Author

I'm sorry for all the troubles. I had issues with flake on the pre-commit hook, so I took the liberty to update it to the last version.

I forced push to clean the commit history and regroup all the isort and black reformatting under the same commit

@MarcBresson
Copy link
Contributor Author

All the tests passed, I rebased the branch so its ready to be merged

@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8073de4) 93.88% compared to head (c5fa3fb) 93.87%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2142      +/-   ##
==========================================
- Coverage   93.88%   93.87%   -0.02%     
==========================================
  Files         135      135              
  Lines       13429    13420       -9     
==========================================
- Hits        12608    12598      -10     
- Misses        821      822       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

darts/models/forecasting/arima.py Outdated Show resolved Hide resolved
darts/models/forecasting/arima.py Outdated Show resolved Hide resolved
@MarcBresson
Copy link
Contributor Author

Should I update the test with

def test_historical_forecasts_transferrable_future_cov_local_models(self):
    model = ARIMA(p=np.array([1, 2, 3, 4, 6]), q=(2, 3))
    ...

?

@madtoinou
Copy link
Collaborator

Instead of modifying the current test, I would rather add new one so that the difference between the two set of parameters can be highlighted/verified.

Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this nice contribution @MarcBresson, I didn't even know that you could use a sequence of lags for more fine grained control over the parameters. That's great!

I added some suggestions that are just trying to rephrase some bits here and there to follow more our style from other models.

After that it's ready to be merged 🚀

darts/models/forecasting/arima.py Show resolved Hide resolved
darts/models/forecasting/arima.py Outdated Show resolved Hide resolved
darts/models/forecasting/arima.py Outdated Show resolved Hide resolved
darts/models/forecasting/arima.py Outdated Show resolved Hide resolved
darts/models/forecasting/arima.py Show resolved Hide resolved
darts/models/forecasting/arima.py Outdated Show resolved Hide resolved
darts/models/forecasting/arima.py Show resolved Hide resolved
@@ -6,7 +6,7 @@ repos:
language_version: python3

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 7.0.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's add this to the CHANGELOG.md under
UNRELEASED -> For developers of the library

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I update other pre-commit hooks ? That way we are up to date and developers will not have to pre-commit install anytime soon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated all pre-commit hooks and change the argument for pyupgrade. See changelog (or commit description) for more info

darts/models/forecasting/arima.py Show resolved Hide resolved
Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

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

Hi @MarcBresson, thanks for the changes. Everything loks fine now.

As a last point, could you move the changes to the pre commit hooks to a separate PR? Like that we keep it clearly separated.

After that we can merge :) 🚀

.pre-commit-config.yaml Outdated Show resolved Hide resolved
.pre-commit-config.yaml Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
darts/models/forecasting/arima.py Show resolved Hide resolved
Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

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

Thanks a lot @MarcBresson for this contribution, now everything looks perfect :) 🚀

Sorry if the journey was a bit long for this. I'll merge now.

@dennisbader dennisbader merged commit 9e43e3c into unit8co:master Feb 16, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants