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

Feat/probabilistic-lgbm-linreg #831

Merged
merged 16 commits into from
Mar 11, 2022
Merged

Feat/probabilistic-lgbm-linreg #831

merged 16 commits into from
Mar 11, 2022

Conversation

gnwhr
Copy link
Contributor

@gnwhr gnwhr commented Mar 1, 2022

First step towards #616.

Summary

Implements quantile and poisson regression for the LightGBMModel and LinearRegressionModel.

@codecov-commenter
Copy link

codecov-commenter commented Mar 1, 2022

Codecov Report

Attention: Patch coverage is 97.18310% with 4 lines in your changes missing coverage. Please review.

Project coverage is 91.37%. Comparing base (9cb3fd7) to head (2fe0fe1).
Report is 528 commits behind head on master.

Files with missing lines Patch % Lines
...arts/models/forecasting/linear_regression_model.py 94.73% 3 Missing ⚠️
darts/models/forecasting/regression_model.py 97.29% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #831      +/-   ##
==========================================
+ Coverage   91.27%   91.37%   +0.09%     
==========================================
  Files          70       70              
  Lines        6978     7105     +127     
==========================================
+ Hits         6369     6492     +123     
- Misses        609      613       +4     

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

@gnwhr gnwhr changed the title Feat/probabilistic-lgbm Feat/probabilistic-lgbm/linreg Mar 7, 2022
@gnwhr gnwhr changed the title Feat/probabilistic-lgbm/linreg Feat/probabilistic-lgbm-linreg Mar 7, 2022
Copy link
Contributor

@hrzn hrzn left a comment

Choose a reason for hiding this comment

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

Looks good! Just got a few comments

return TimeSeries(new_xa)

@staticmethod
def _check_quantiles(quantiles):
Copy link
Contributor

Choose a reason for hiding this comment

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

This code is already present in utils.likelihood_models.py. Could we extract this somewhere (e.g. in utils/utils.py)?

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 moved it to utils/utils.py


return self

super().fit(
Copy link
Contributor

Choose a reason for hiding this comment

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

This will also be called one last time when likelihood=quantile. is this intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

does the return self statement in line 171 not exit the method?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh right, maybe you could add an else clause, just for clarity here?

Copy link
Contributor

@hrzn hrzn left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!
Got a tiny suggestion to add in else clause around line 170 of linear_regression.py, then all good.

@gnwhr gnwhr merged commit 0233756 into master Mar 11, 2022
@madtoinou madtoinou deleted the feat/probabilistic-lgbm branch July 5, 2023 21:55
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.

3 participants