| plot.combinedGradientForest | R Documentation |
combinedGradientForest objects
Plot method for combinedGradientForest objects.
## S3 method for class 'combinedGradientForest'
plot(x, plot.type = c("Overall.Importance","Predictor.Ranges",
"Predictor.Density","Cumulative.Importance","Performance")[1],par.args=NULL,
plot.args=NULL,...)
x |
an object of class |
plot.type |
specifies the type of plot defined for the object. Current choices for
|
par.args |
arguments to be passed on to be used by |
plot.args |
arguments to be passed on according
the |
... |
further arguments passed to or from other methods. |
The following are the default settings for par.args for each plot type. See par for the definition of each of the arguments.
Overall.Importance: list(mfrow = c(1, 2), mar = c(4, 6, 2, 1))
Predictor.Ranges: None
Predictor.Density: None
Cumulative.Importance: None
Performance: list(mfrow=c(1,1),mar=old.mar+c(0,2.5,0,0))
The following are the default settings for plot.args for each plot type.
Overall.Importance: list(cex.axis = 0.7, cex.names = cex.axis, horiz = TRUE, las = 1)
Predictor.Ranges: None
Predictor.Density: None
Cumulative.Importance: list(weight="rsq.total", use.diff=FALSE, prednames=names(x$X)[-1], show.weights=FALSE, show.gf.names=TRUE, sort=TRUE), where:
weight is the type of weighting to perform across gradientForest objects (see same argument in cumimp.combinedGradientForest);
if use.diff=TRUE the differenced cumulative importances are plotted;
prednames is the names of the predictors for which plots are required;
if show.weights=TRUE indicate gradientForest object weight per bin by colour saturation;
if show.gf.names=FALSE do not show the individual gradientForest object cumulative curves;
and if sort=TRUE, sort predictors by importance, otherwise use order in prednames.
If weight has multiple elements, the given weightings are shown but not the individual gradientForest objects.
Performance: list(horizontal = FALSE, show.names = FALSE, cex.axis = 0.7, las = 2), where
show.names is set to TRUE or FALSE
to override the defaults on whether an x-axis label on performance plot is printed for each group.
The overall importance plot shows a simple barplot of the ranked importances of
the physical variables. The most reliable importances are the R^2 weighted importances.
The predictor ranges plot shows box plots of the observed predictors separately for each gradientForest object.
The predictor density plot shows the density of the observed predictors with gradientForest objects denoted
by colour; the combined density is also shown.
The cumulative importance plot is an integrated form of the split density plot. The cumulative importance is plotted separately for all species and averaged over all species. The cumulative importance can be interpreted as a mapping from an environmental gradient on to biological gradient
The performance plot shows the goodness of fit performance measures for all
species for which the physical variables have some predictive power. For
regression, the measure is out-of-bag R^2. For classification, the measure is
out-of-bag error rate.
N. Ellis, CSIRO, Cleveland, Australia. <Nick.Ellis@csiro.au>. S.J. Smith, DFO, Dartmouth, NS, Canada. <Stephen.Smith@dfo-mpo.gc.ca>
Breiman, L. (2001) Random Forests. Machine Learning, 45(1), 5–32.
Ellis, N., Smith, S.J., and Pitcher, C.R. (2012) Gradient Forests: calculating importance gradients on physical predictors. Ecology, 93, 156–168.
Liaw, A. and Wiener, M. (2002) Classification and regression by randomforest. R News, 2(3), 18–22. http://CRAN.R-project.org/doc/Rnews/
plot.gradientForest
data(CoMLsimulation)
preds <- colnames(Xsimulation)
specs <- colnames(Ysimulation)
f1 <- gradientForest(data.frame(Ysimulation,Xsimulation), preds, specs[1:6], ntree=10)
f2 <- gradientForest(data.frame(Ysimulation,Xsimulation), preds, specs[1:6+6], ntree=10)
f12 <- combinedGradientForest(west=f1,east=f2)
plot(f12,plot.type="Predictor.Ranges")
plot(f12,plot.type="Predictor.Density")
plot(f12,plot.type="Cumulative.Importance")
plot(f12,plot.type="Cumulative.Importance",plot.args=list(weight="uniform"))
plot(f12,plot.type="Cumulative.Importance",plot.args=list(weight="species"))
plot(f12,plot.type="Cumulative.Importance",plot.args=list(weight="rsq.total"))
plot(f12,plot.type="Cumulative.Importance",plot.args=list(weight="rsq.mean"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.