importance.gradientForest: Importance of the variables in a 'gradientForest' or...

Description Usage Arguments Value Author(s) Examples

Description

Compute the importance measures as a named vector

Usage

1
2
3
## S3 method for class 'gradientForest'
importance(x, type = c("Accuracy", "Impurity", "Weighted", "Raw", "Species")[3], 
sort = TRUE, ...)

Arguments

x

an object of class gradientForest, resulting from a call to gradientForest

type

the type of importance measure. For type="Species" the importance measure is the R^2 value for each species.

sort

if TRUE sort the result in decreasing order

...

further arguments for other methods

Value

a named vector of importance measures, one for each variable (or species), possibly sorted

Author(s)

Original code written by N. Ellis, CSIRO, Cleveland, Australia. <Nick.Ellis@csiro.au>. Modified by S.J. Smith, DFO, Dartmouth, NS, Canada. <Stephen.Smith@dfo-mpo.gc.ca>

Examples

1
2
3
4
5
6
7
8
9
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)
importance(f1)
importance(f1, "Species")
importance(f2, "Impurity")

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