Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
None.
What does this implement/fix? Explain your changes.
Adds support for
dist="NegativeBinomial"to theXGBoostLSSwrapper. Both skpro and xgboostlss already provide this distribution, but the wrapper currently cannot construct it or convert its predicted parameters.Unlike the other supported distributions, xgboostlss's
NegativeBinomialrequires separate response functions for its parameters. This change:response_fntoresponse_fn_total_countand uses"sigmoid"forresponse_fn_probs.mu = total_count * probs / (1 - probs)andalpha = total_count.get_test_paramsfor coverage by the generic estimator checks.The fitted
total_countis preserved asalpha, without imposing a dispersion floor that would change the predicted variance.Does your contribution introduce a new dependency? If yes, which one?
No.
What should a reviewer concentrate their feedback on?
Did you add any tests for the change?
Yes. Two focused regression tests cover:
NegativeBinomial, including smalltotal_countvalues, and finite means for saturated float32 probabilities.total_count, and returning a skproNegativeBinomialwith integer-valued quantiles.The new
get_test_paramsconfiguration also exercises the distribution through skpro's existing generic estimator checks, avoiding duplicate tests for the standard prediction interface.Local validation:
Any other comments?
Local fitting tests were run with
OMP_NUM_THREADS=1on a macOS laptop. Without this setting, negative-binomial fitting stalled on my macOS environment, including when using xgboostlss directly without skpro. The environment loads multiple OpenMP runtimes; the cause has not been confirmed.No threading workaround is included in this PR. Feedback on whether this also occurs on the macOS CI runners would be welcome.