swager / randomForestCI

This package is DEPRECATED. Please use the packages `grf` or `ranger` instead, which have built-in confidence intervals.
https://github.com/swager/grf
MIT License
69 stars 21 forks source link

Standard error of transformed predictions using randomForestInfJack #12

Open lucazav opened 4 years ago

lucazav commented 4 years ago

I would like to get the standard error of predictions from a random forest trained on y=log(x+1) target. The var.hat returned by randomForestInfJack is the variance of y, so se=sqrt(var.hat). Is there a way to get the variance of x given var(y) so that I can get se(x)? Thank you.

swager commented 4 years ago

No there's an asymmetry between x and y in a forest: The forest can only be used to predict y from x, but not vice-versa (and the same goes for uncertainty quantification).

lucazav commented 4 years ago

I found a way to calculate standard error after a variable transformation thanks to this post.