Description Usage Arguments Details Author(s) References See Also Examples

This function plots 4 graphs illustrating VSURF results.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ```
## S3 method for class 'VSURF'
plot(x, step = "all", var.names = FALSE, imp.mean = TRUE,
imp.sd = TRUE, nvar.imp.mean = length(x$imp.mean.dec),
nvar.imp.sd = length(x$imp.sd.dec),
nvar.interp = length(x$varselect.thres),
nvar.pred = length(x$varselect.pred), ...)
## S3 method for class 'VSURF_thres'
plot(x, var.names = FALSE, imp.mean = TRUE,
imp.sd = TRUE, nvar.imp.mean = length(x$imp.mean.dec),
nvar.imp.sd = length(x$imp.sd.dec), ...)
## S3 method for class 'VSURF_interp'
plot(x, var.names = FALSE,
nvar.interp = length(x$varselect.thres), ...)
## S3 method for class 'VSURF_pred'
plot(x, var.names = FALSE,
nvar.pred = length(x$varselect.pred), ...)
``` |

`x` |
An object of class |

`step` |
A character string indicating which step must be plotted (default is "all"). Available choices are "thres", "interp", "pred". |

`var.names` |
If FALSE (default) xticks are the numbering given by the sorting of VI mean, if TRUE they are the variables names. |

`imp.mean` |
If TRUE (default) VI mean is plotted, if FALSE it is not. |

`imp.sd` |
If TRUE (default) VI standard deviation is plotted, if FALSE it is not. |

`nvar.imp.mean` |
The number of variables to be kept for the VI mean plot. |

`nvar.imp.sd` |
The number of variables to be kept for the VI standard deviation plot. |

`nvar.interp` |
The number of variables to be kept for the "interp" plot. |

`nvar.pred` |
The number of variables to be kept for the "pred" plot. |

`...` |
Arguments to be passed to |

The 2 graphs of the top row correspond to the "thresholding step" (and only
these 2 graphs are plotted by the `plot.VSURF_thres`

function). The
top left graph plots the mean variable importance in decreasing order (black
curve). The red horizontal line represent the value of the threshold. The
top right graph plots the standard deviation of variable importance with
variables ordered according to their mean variable importance in decreasing
order (black curve). The green line represents the predictions given by a
CART tree fitted to the black curve (the standard deviations). Finally, the
dotted horizontal red line represents the minimum value of the CART
predictions, which actually is the value of the threshold.

The bottom left graph corresponds to the "interpretation step" (and only
this graph is plotted by the `plot.VSURF_interp`

function). It plots
the mean OOB error rate of embedded random forests models (from the one with
only one variable as predictor, to the one with all variables kept after the
"thresholding step"). The vertical red line indicates the retained model.

The bottom right graph corresponds to the "predicton step" (and only this
graph is plotted by the `plot.VSURF_pred`

function). It plots the mean
OOB error rate of embedded random forests models (the difference, here,
being that variables are added to the model in a step-wise manner). The
retained model is the final one.

Robin Genuer, Jean-Michel Poggi and Christine Tuleau-Malot

Genuer, R. and Poggi, J.M. and Tuleau-Malot, C. (2010),
*Variable selection using random forests*, Pattern Recognition Letters
31(14), 2225-2236

Genuer, R. and Poggi, J.M. and Tuleau-Malot, C. (2015),
*VSURF: An R Package for Variable Selection Using Random Forests*,
The R Journal 7(2):19-33

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ```
## Not run:
data(iris)
iris.vsurf <- VSURF(iris[,1:4], iris[,5])
plot(iris.vsurf)
plot(iris.vsurf, var.names=TRUE)
plot(iris.vsurf, step="thres")
# A more interesting example with toys data (see \code{\link{toys}})
# (a few minutes to execute) and intermediate functions
data(toys)
toys.vsurf <- VSURF(toys$x, toys$y)
plot(toys.vsurf)
plot(toys.vsurf, nvar.imp.mean = 50, nvar.imp.sd = 50)
toys.thres <- VSURF_thres(toys$x, toys$y)
plot(toys.thres)
plot(toys.thres, nvar.imp.mean = 70, imp.sd = FALSE)
toys.interp <- VSURF_interp(toys$x, toys$y, vars = toys.thres$varselect.thres)
plot(toys.interp, var.names = TRUE)
toys.pred <- VSURF_pred(toys$x, toys$y, err.interp = toys.interp$err.interp,
varselect.interp = toys.interp$varselect.interp)
plot(toys.pred, var.names = TRUE)
## End(Not run)
``` |

robingenuer/VSURF documentation built on March 19, 2018, 12:21 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.