Skip to content

randomForests predict problem

2 messages · Liaw, Andy, Yves Brostaux

#
Yves,

Which version of the package are you using?  I get:
2-4-d-injury         alternarialeaf-spot 
                          0                          37 
                anthracnose            bacterial-blight 
                         10                           3 
          bacterial-pustule                  brown-spot 
                          2                          29 
             brown-stem-rot                charcoal-rot 
                         11                           7 
              cyst-nematode diaporthe-pod-&-stem-blight 
                          0                           0 
      diaporthe-stem-canker                downy-mildew 
                          4                           8 
         frog-eye-leaf-spot            herbicide-injury 
                         17                           0 
     phyllosticta-leaf-spot            phytophthora-rot 
                          3                           5 
             powdery-mildew           purple-seed-stain 
                          4                           5 
       rhizoctonia-root-rot 
                          5 

Cheers,
Andy
------------------------------------------------------------------------------
#
I use randomForest version 3.4-4, but yes, now I correctly omitted NA's it 
works. I should have made a mistake while removing them first time.

I was surprised that this method doesn't have another way to deal with NA's 
than omitting them. As Torsten Hothorn suggested, the associated predict 
function should then check for NA's in newdata, shouldn't it ?

Thank you both for your answers !
At 15:12 02/04/03, Liaw, Andy wrote: