predict.gradientForest | R Documentation |
Predict method for gradientForest
or combinedGradientForest
objects.
## S3 method for class 'gradientForest'
predict(object, newdata, extrap=TRUE, ...)
## S3 method for class 'combinedGradientForest'
predict(object, newdata, extrap=TRUE, ...)
object |
an object of class |
newdata |
An optional data frame in which to look for variables with which to predict.
If omitted, the environmental variables at the sites in |
extrap |
Controls extrapolation to predictor values outside the range of the original site data. CAUTION: Extrapolation is an experimental feature. No studies have been done to determine what kinds of extrapolation are meaningful. Extrapolation is provided as a convenience to the user who wants extrapolation anyway, and is willing to experiment with their dataset to find useful extrapolation levels.
|
... |
further arguments passed to |
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.
CAUTION: Extrapolation is an experimental feature. No studies have been done to determine what kinds of extrapolation are meaningful. Extrapolation is provided as a convenience to the user who wants extrapolation anyway, and is willing to experiment with their dataset to find useful extrapolation levels.
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. If 0 <= extrap <= 1
, then extrapolation is compressed
by ((x - xmax) * (ymax-ymin)/(xmax-xmin))^extrap
with some
offsets applied to keep the extrapolation below linear extrapolation at
all times. A similar transformation is applied to new environmental
values below xmin
. Values of extrap
close to 1 approach
linear extrapolation, and values close to 0 approach fixing predictions
at ymax
.
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
.
N. Ellis, CSIRO, Cleveland, Australia. <Nick.Ellis@csiro.au>
Ellis, N., Smith, S.J., and Pitcher, C.R. (2012) Gradient Forests: calculating importance gradients on physical predictors. Ecology, 93, 156–168.
gradientForest
data(CoMLsimulation)
preds <- colnames(Xsimulation)
specs <- colnames(Ysimulation)
f1 <- gradientForest(data.frame(Ysimulation,Xsimulation), preds, specs, ntree=10)
f1.pred<-predict(f1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.