multi_predict() doesn't support type = "raw"
predictions for {lightgbm}
classification models
#45
Labels
bug
an unexpected problem or unintended behavior
There is some code in
{bonsai}
that looks like it was intended to supportmulti_predict(..., type = "raw")
for{lightgbm}
classification models.bonsai/R/lightgbm_data.R
Lines 146 to 158 in 6c090e1
However, I don't believe
{bonsai}
actually respectstype = "raw"
formulti_predict()
.Reproducible Example
See the following coded for evidence of this claim. I saw this behavior with both
{lightgbm}
v3.3.2 installed from CRAN and with the latest development version (microsoft/LightGBM@c7102e5).sessionInfo() (click me)
The predictions from
multi_predict(..., type = "raw")
look like probabilities (between 0 and 1, sum to 1) and don't match{lightgbm}
's output for raw predictions.type = "prob"
predictions look correct, and like probabilities.I observed the same thing for binary classification models. This doesn't matter for regression models, because
"raw"
predictions are the default for{lightgbm}
regression models using built-in objectives.Notes for Maintainers
I believe the issue is that this block does not contain an
if (type == "raw")
condition:bonsai/R/lightgbm.R
Lines 366 to 375 in 6c090e1
Is it expected that
{bonsai}
supportsmulti_predict(..., type = "raw")
for{lightgbm}
classification models? If so, would you be open to me putting up a pull request to add this support?Thanks for your time and consideration.
The text was updated successfully, but these errors were encountered: