Description Usage Arguments Value Warning Note Author(s) References See Also Examples
Plots of out-of-bag predictions and OOB error vs. number of variables.
1 2 3 4 5 6 |
x |
An object of class varSelRFBoot, such as returned by
function |
oobProb |
If TRUE plot (average) out-of-bag predictions. See
|
oobProbBoxPlot |
If TRUE plot a box-plot of out-of-bag predictions. |
ErrorNum |
If TRUE plot OOB error (as returned by random forest) vs. the number of variables. |
subject.names |
If not NULL, a vector, of the same length as the number of cases (samples or subjects) with IDs for the cases/samples/subjects, that will be shown to the left of the average out-of-bag prediction. |
class.to.plot |
If not NULL, an integer or a vector of integers. These integers are those class levels for which out-of-bag predictions plots will be returned. |
... |
Not used. |
This function is only used for its side effects of producing plots.
The OOB Error rate is biased down (and can be severely biased down) because we do (potentially many) rounds of reducing the set of predictor variables until we minimize this OOB error rate. Note, however, that this is NOT the error rate reported as the estimate of the error rate for the procedure (for which we use the .632+ bootstrap rule).
When plotting the out-of-bag predictions, we show one plot for each
class. This is an overkill for two-class problems, but not necessarily
for problems with more than two classes. Use class.to.plot
to
plot only those classes that interest you.
Ramon Diaz-Uriarte rdiaz02@gmail.com
Breiman, L. (2001) Random forests. Machine Learning, 45, 5–32.
Diaz-Uriarte, R. and Alvarez de Andres, S. (2005) Variable selection from random forests: application to gene expression data. Tech. report. http://ligarto.org/rdiaz/Papers/rfVS/randomForestVarSel.html
Efron, B. & Tibshirani, R. J. (1997) Improvements on cross-validation: the .632+ bootstrap method. J. American Statistical Association, 92, 548–560.
randomForest
,
varSelRF
,
summary.varSelRFBoot
,
varSelRFBoot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
## This is a small example, but can take some time.
x <- matrix(rnorm(25 * 30), ncol = 30)
x[1:10, 1:2] <- x[1:10, 1:2] + 2
cl <- factor(c(rep("A", 10), rep("B", 15)))
rf.vs1 <- varSelRF(x, cl, ntree = 200, ntreeIterat = 100,
vars.drop.frac = 0.2)
rf.vsb <- varSelRFBoot(x, cl,
bootnumber = 10,
usingCluster = FALSE,
srf = rf.vs1)
rf.vsb
summary(rf.vsb)
plot(rf.vsb)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.