I am new to R and randomForests so bear with me. I am trying to visualise my randomForest a little better using the MDSplot() function in Random Forest. There are two things i would like to do, and i dont know if they are possible or sensible.

1) Instead of just having colored markers on the MDSplot i want to have my sample names (row names) so i can see where each row falls, to see where each point clusters.

2) When i used my randomForest to predict on new data, i want to overlay them on the MDSplot (i.e. the PCA built from the proximity matrix which i trained my RF on) so that i can see how close the new data points lie next to the orginal clustered groups.

Thanks for your help, Anthony

P.s if you have any other suggestions on how to visualise the RF those are great too!

  • 1
    $\begingroup$ (1) forestfloor package (2) ggRandomForests - I haven't tried either. But they both take a different approach than it seems that you're planning in interpreting the model. $\endgroup$ – charles Feb 5 '16 at 0:04

Random Forest is more of a black box algorithm which gives you a lot of flexibility but lacks on the interpretation side, unlike decision trees which are easy to interpret. I think visualization of random forest doesn't make much sense because generally you have more than 500 trees in a random forest, I guess the plot will be highly cluttered. Other than this you might find following helpful Best way to present a random forest in a publication?

  • $\begingroup$ I disagree that model fits trained by a black box algorithm cannot be interpreted(SVM, Neural nets, RF, GBM,....). These models are just fitted mapping functions connecting feature space with target space and they have a geometrical shape. You don't have to represent the model fit by the algorithm training it (trees, neural nets, boosting iterations...). In general, partial dependence plots is a good start. $\endgroup$ – Soren Havelund Welling Feb 7 '16 at 21:06
  • 1
    $\begingroup$ Yes I agree with you, but my point was like decision trees can be plotted directly and can be easily interpreted even by a layman, Random forests on the other hand lack in this regard. I totally agree on the partial dependence plots...they sure can be used to get some idea. $\endgroup$ – firefly Feb 9 '16 at 3:11

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.