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
Enhance inplace prediction. #6653
Conversation
The old adapters for dense and csr are kept to preserve API for DMatrix. The proxy dmatrix was used internally for device quantile dmatrix, now we reuse it for inplace predict. |
Codecov Report
@@ Coverage Diff @@
## master #6653 +/- ##
==========================================
+ Coverage 81.12% 81.25% +0.13%
==========================================
Files 13 13
Lines 3698 3729 +31
==========================================
+ Hits 3000 3030 +30
- Misses 698 699 +1
Continue to review full report at Codecov.
|
missing: float = np.nan, | ||
validate_features: bool = True, | ||
base_margin: Any = None, | ||
strict_shape: bool = False |
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 parameter may needs more thought. It's meant to be a placeholder for #6638 . It affects only the leaf prediction.
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.
There is a lot of effort to support base margin here. Why is it so important? Couldnt you just add it to the out prediction in numpy?
@RAMitchell no, there's predict transform. It isn't a lots of effort I think, all the needed tools are there, the PR is just gluing them together. |
* Accept array interface for csr and array. * Accept an optional proxy dmatrix for metainfo. This constructs an explicit `_ProxyDMatrix` type in Python.
c0ad959
to
9473f5a
Compare
Extracted from #6638 .