-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[R-package] Add sparse feature contribution predictions (#5108)
* add predcontrib for sparse inputs * register newly-added function * comments * correct wrong types in test * forcibly take transpose function from Matrix * keep row names, test comparison to dense inputs * workaround for passing test while PR for row names is not merged * Update R-package/R/lgb.Predictor.R Co-authored-by: James Lamb <[email protected]> * Update R-package/R/lgb.Predictor.R Co-authored-by: James Lamb <[email protected]> * Update R-package/R/lgb.Predictor.R Co-authored-by: James Lamb <[email protected]> * proper handling of integer overflow * add test for CSR contrib row names * add more tests for predict(<sparse>, predcontrib=TRUE) * make linter happy * linter * linter * check error messages for bad input shapes * fix regex * hard-coded number of columns in regex for tests Co-authored-by: James Lamb <[email protected]>
- Loading branch information
1 parent
688f73d
commit 6f92d47
Showing
5 changed files
with
312 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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