-
Notifications
You must be signed in to change notification settings - Fork 909
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/sample weights #2404
Feat/sample weights #2404
Conversation
f"Possible values are: equal, linear_decay, exponential_decay.", | ||
) | ||
elif isinstance(sample_weight, TimeSeries): | ||
# The error is caught later, should we still verify it here? |
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.
why this is an error if in the docstring you are saying that If a TimeSeries is passed, then those weights are used.
?
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.
This is a placeholder, we are trying to think if it's worth it to check that the time index of the passed series matches the index of the training series for example.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2404 +/- ##
==========================================
+ Coverage 93.77% 93.78% +0.01%
==========================================
Files 138 138
Lines 14384 14492 +108
==========================================
+ Hits 13488 13592 +104
- Misses 896 900 +4 ☔ View full report in Codecov by Sentry. |
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!
One minor comment about the index for the generated weights; maybe we should consider the two most extremes index values rather than the length of the longest series? WDYT?
Checklist before merging this PR:
Fixes #1175, fixes #2107.
(this is a continuation of #2362)
Summary
fit()
now has two new parameterssample_weight
andval_sample_weight
which allow to pass sample weights for training and validation (val_sample_weights
only for models that support validation sets)