plot.combinedGradientForest: Plots for 'combinedGradientForest' objects

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

Description

Plot method for combinedGradientForest objects.

Usage

1
2
3
4
## 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,...)

Arguments

x

an object of class combinedGradientForest generated by combinedGradientForest.

plot.type

specifies the type of plot defined for the object. Current choices for gradientForest objects are "Overall.Importance", "Predictor.Ranges", "Predictor.Density", "Cumulative.Importance" and "Performance". Default "Overall.Importance".

par.args

arguments to be passed on to be used by par according the plot.type chosen. See Details for the defaults for each plot type.

plot.args

arguments to be passed on according the plot.type chosen. See Details for the defaults for each plot type.

...

further arguments passed to or from other methods.

Details

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.

Value

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.

Author(s)

N. Ellis, CSIRO, Cleveland, Australia. <[email protected]>. S.J. Smith, DFO, Dartmouth, NS, Canada. <[email protected]>

References

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/

See Also

plot.gradientForest

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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"))

slarge/gradientForest documentation built on May 3, 2019, 4:05 p.m.