5
$\begingroup$

In regression problems random forests yield a prediction for each case by averaging the results of each single tree in the forest. I would like to draw a 95% prediction interval around each prediction. There is a nice option interval="prediction" for the prediction method of linear models, but there's no such thing for random forests (at least in the R package randomForest). Can I presume that the casewise predictions of the single trees are normally distributed and apply the formula http://mathurl.com/bbvuvx9 or should I determine it by bootstrapping? If so, how can this be done?

$\endgroup$
4
$\begingroup$

I'm assuming you're talking about the continuous response case. If so, I'd recommend the quantregForest package that layers on top of the basic randomForest package and gives conditional quantile predictions. The documentation is quite good. Instead of assuming a gaussian distribution, it build an empirical density function from the terminal nodes.

$\endgroup$
  • 2
    $\begingroup$ stats.ox.ac.uk/~meinshau/quantregforests.pdf describes the technique. $\endgroup$ – B_Miner Feb 11 '13 at 17:30
  • $\begingroup$ @Shea Parkes: I did not know this package, thanks for the hint. $\endgroup$ – user7417 Feb 12 '13 at 10:00
  • $\begingroup$ @B_Miner: I already downloaded the pdf and shall dig into it... Certainly I'll come back with more questions ;-) $\endgroup$ – user7417 Feb 12 '13 at 10:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.