predict.gradientForest: Predict for gradientForest

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

Description

Predict method for gradientForest or combinedGradientForest objects.

Usage

1
2
3
4
## S3 method for class 'gradientForest'
predict(object, newdata, extrap=TRUE, ...)
## S3 method for class 'combinedGradientForest'
predict(object, newdata, extrap=TRUE, ...)

Arguments

object

an object of class gradientForest or combinedGradientForest.

newdata

An optional data frame in which to look for variables with which to predict. If omitted, the environmental variables at the sites in object$X are used.

extrap

if TRUE use linear extrapolation for predictor values outside the range of the original site data, otherwise limit to the range of of the site data.

...

further arguments passed to cumimp.

Details

The predictor cumulative functions can be used to transform grid data layers of environmental variables to a common biological importance scale. This transformation of the multi-dimensional environment space is to a biological space in which coordinate position represents composition associated with the predictors. These inferred compositional patterns can be mapped in biological space and geographic space in a manner analogous to ordination, that takes into account the non-linear and sometimes threshold changes that occur along gradients.

Where environmental values lie outside the range of the original site data, by default extrapolation is performed. That is, if (xmin,xmax) are the range of the site predictors with corresponding cumulative importance values (ymin,ymax), the prediction y at a new environmental value outside the range (xmin,xmax) is ymin + (y-ymin)*(x-xmin)/(xmax-xmin). This is equivalent to assigning the average importance inside (xmin,xmax) to all values outside the range. If extrap=FALSE, linear extrapolation is not performed; instead predictions below xmin are fixed at ymin and predictions above xmax are fixed at ymax. This is equivalent to assigning zero importance outside the range of the site data.

Value

an object of class predict.gradientForest. It is a dataframe in which each predictor has been transformed to the biological scale by the cumulative importance function, as defined by cumimp.

Author(s)

N. Ellis, CSIRO, Cleveland, Australia. <Nick.Ellis@csiro.au>

References

Ellis, N., Smith, S.J., and Pitcher, C.R. (2012) Gradient Forests: calculating importance gradients on physical predictors. Ecology, 93, 156–168.

See Also

gradientForest

Examples

1
2
3
4
5
data(CoMLsimulation)
preds <- colnames(Xsimulation)
specs <- colnames(Ysimulation)
f1 <- gradientForest(data.frame(Ysimulation,Xsimulation), preds, specs, ntree=10)
f1.pred<-predict(f1)

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