Best way to present a random forest in a publication? I am using the random forest algorithm as a robust classifier of two groups in a microarray study with 1000s of features.  


*

*What is the best way to present the random forest so that there is enough information to make it
reproducible in a paper?

*Is there a plot method in R to actually plot the tree, if there are a small number of features?

*Is the OOB estimate of error rate the best statistic to quote?

 A: Regarding making it reproducible, the best way is to provide reproducible research (i.e. code and data) along with the paper.  Make it available on your website, or on a hosting site (like github).
Regarding visualization, Leo Breiman has done some interesting work on this (see his homepage, in particular the section on graphics).
But if you're using R, then the randomForest package has some useful functions:
data(mtcars)
mtcars.rf <- randomForest(mpg ~ ., data=mtcars, ntree=1000, keep.forest=FALSE,
                           importance=TRUE)
plot(mtcars.rf, log="y")
varImpPlot(mtcars.rf)

And 
set.seed(1)
data(iris)
iris.rf <- randomForest(Species ~ ., iris, proximity=TRUE,
                        keep.forest=FALSE)
MDSplot(iris.rf, iris$Species)

I'm not aware of a simple way to actually plot a tree, but you can use the getTree function to retrieve the tree and plot that separately.
getTree(randomForest(iris[,-5], iris[,5], ntree=10), 3, labelVar=TRUE)

The Strobl/Zeileis presentation on "Why and how to use random forest variable importance measures (and how you shouldn’t)" has examples of trees which must have been produced in this way.  This blog post on tree models has some nice examples of CART tree plots which you can use for example.
As @chl commented, a single tree isn't especially meaningful in this context, so short of using it to explain what a random forest is, I wouldn't include this in a paper.
A: *

*As Shane wrote; make it reproducible research + include random seeds, because RF is stochastic.

*First of all, plotting single trees forming RF is nonsense; this is an ensemble classifier, it makes sense only as a whole. But even plotting the whole forest is nonsense -- it is a black-box classifier, so it is not intended to explain the data with its structure, rather to replicate the original process. Instead, make some of plots Shane suggested.

*In practice, OOB is a very good error approximation; yet this is not a widely accepted fact, so for publication it is better to also make a CV to confirm it. 

A: Keep in mind the caveats in the other answers about the plot necessarily being meaningful.  But if you want a plot for illustrative/pedagogical purposes, the following snippet of R might be useful.  Not hard to add "split point" to the edge text if you need it.
to.dendrogram <- function(dfrep,rownum=1,height.increment=0.1){

  if(dfrep[rownum,'status'] == -1){
    rval <- list()

    attr(rval,"members") <- 1
    attr(rval,"height") <- 0.0
    attr(rval,"label") <- dfrep[rownum,'prediction']
    attr(rval,"leaf") <- TRUE

  }else{##note the change "to.dendrogram" and not "to.dendogram"
    left <- to.dendrogram(dfrep,dfrep[rownum,'left daughter'],height.increment)
    right <- to.dendrogram(dfrep,dfrep[rownum,'right daughter'],height.increment)
    rval <- list(left,right)

    attr(rval,"members") <- attr(left,"members") + attr(right,"members")
    attr(rval,"height") <- max(attr(left,"height"),attr(right,"height")) + height.increment
    attr(rval,"leaf") <- FALSE
    attr(rval,"edgetext") <- dfrep[rownum,'split var']
    #To add Split Point in Dendrogram
    #attr(rval,"edgetext") <- paste(dfrep[rownum,'split var'],"\n<",round(dfrep[rownum,'split point'], digits = 2),"=>", sep = " ")
  }

  class(rval) <- "dendrogram"

  return(rval)
}

mod <- randomForest(Species ~ .,data=iris)
tree <- getTree(mod,1,labelVar=TRUE)

d <- to.dendrogram(tree)
str(d)
plot(d,center=TRUE,leaflab='none',edgePar=list(t.cex=1,p.col=NA,p.lty=0))

