parsnip
parsnip copied to clipboard
Prediction for rand_forest when type = "quantile"
I can't seem to be able to predict quantiles when using rand_forest
with the ranger
engine. While the ``quantreg = TRUE``` argument is passed to ranger:
library(parsnip)
library(dplyr)
data("airquality")
regr <- rand_forest(mode = "regression") %>% set_engine("ranger", quantreg = TRUE)
airquality <- na.omit(airquality)
regr_fit <- regr %>% fit(Ozone ~ ., data = airquality)
preds <- regr_fit %>% predict(airquality, type = 'quantile')
This produces the error:
Error: No quantile prediction method defined for this engine.
However, quantiles can be predicted using the underlying ranger model, e.g.:
preds <- regr_fit$fit %>% predict(airquality, type = 'quantiles')
head(preds$predictions)
I'll get to implementing this before the next release.
Hi guys,
Is there any update on the quantile Random Forest implementation?
This is on our longer term plan for implementation, after we complete other work like support for survival analysis and case weights.
Hi guys,
I have seen the resolution fork for quantile linear regression. Is there any update on the Quantile Random Forest implementation? I am more referring to the quantregForest R packages than using quantile parameters in ranger. (https://cran.r-project.org/web/packages/quantregForest/quantregForest.pdf)
Thanks!
This is still on our longer term plan! 👍 We are making good headway on survival analysis and case weights, and this change will need to wait on that being completed. The good news is that the changes in prediction type for survival analysis do set us up pretty well for quantile predictions.
Hi, is there any update on quantile regression?
+1