[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 <jaylamb20@gmail.com> * Update R-package/R/lgb.Predictor.R Co-authored-by:
James Lamb <jaylamb20@gmail.com> * Update R-package/R/lgb.Predictor.R Co-authored-by:
James Lamb <jaylamb20@gmail.com> * 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 <jaylamb20@gmail.com>
Showing
Please register or sign in to comment