data(LF.data, LF.testdata, logforest.fit)
#predicting classes for the original data
#NOTE- this is the out-of-bag prediction
predict(object=logforest.fit)
#predicting classes for new test data
predict(object=logforest.fit, newdata=LF.testdata[,1:50])
Run the code above in your browser using DataCamp Workspace