importance.gradientForest {gradientForest} | R Documentation |
gradientForest
or combinedGradientForest
object
Compute the importance measures as a named vector
## S3 method for class 'gradientForest' importance(x, type = c("Accuracy", "Impurity", "Weighted", "Raw", "Species")[3], sort = TRUE, ...)
x |
an object of class |
type |
the type of importance measure. For |
sort |
if |
... |
further arguments for other methods |
a named vector of importance measures, one for each variable (or species), possibly sorted
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>
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")