| VarImp | R Documentation |
A class for random forest variable importance measures VarImp objects.
as.VarImp(object, ...)
## S3 method for class 'data.frame'
## S3 method for class 'data.frame'
as.VarImp(object, FUN = mean,
type = c("Permutation", "Conditional Permutation",
"Selection Frequency", "See Info"),
info = NULL, ...)
## S3 method for class 'matrix'
## S3 method for class 'matrix'
as.VarImp(object, FUN = mean,
type = c("Permutation", "Conditional Permutation",
"Selection Frequency", "See Info"),
info = NULL, ...)
## S3 method for class 'numeric'
## S3 method for class 'numeric'
as.VarImp(object, perTree = NULL,
type = c("Permutation", "Conditional Permutation",
"Selection Frequency", "See Info"),
info = NULL, ...)
is.VarImp(VarImp)
object |
an R object. |
perTree |
a matrix or data frame of size |
type |
a character indicating the type of variable importance measure. |
info |
a list with additional information about the variable importance measure. |
FUN |
a function to compute the variable importance. See section 'Details'. |
VarImp |
an object of the class |
... |
additional arguments. |
as.VarImp creates an object of class 'VarImp'. When object is a
matrix or a data.frame, the final values
are computed by applying FUN to its columns. is.VarImp
returns a logical indicating whether the evaluated object is of class
'VarImp'.
VarImp-methods
## Matrix of fake importance measures per Tree
set.seed(290875)
ntree <- 500
p <- 15
fakeVIM <- matrix(rnorm(ntree * p), nrow = ntree, ncol = p,
dimnames = list(paste0("pred", seq_len(ntree)), paste0("pred", seq_len(p))))
is.VarImp(fakeVIM)
## make a 'VarImp' object
fakeVarImp <- as.VarImp(fakeVIM, type = "See Info",
info = list("The Vims are based on fake data.",
"The mean was used to aggregate across the trees"))
is.VarImp(fakeVarImp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.