Description Usage Arguments Value Author(s) References See Also Examples
A permutation variable importance for groups of variables with Random Forests.
1 2 3 | varImpGroup(object, xdata, ngroups = length(nvarGroup), nvarGroup,
idxGroup, groupsNames = names(nvarGroup),
normalize = (length(unique(nvarGroup)) != 1))
|
object |
A randomForest object. |
xdata |
The input data. |
ngroups |
The number of groups. |
nvarGroup |
The vector of the number of variables in each group. |
idxGroup |
A list of size ‘ngroups’ containing the indexes of each group starting from 0. |
groupsNames |
The group names. |
normalize |
Should the normalized grouped importance measure be computed. |
An object of class ‘importance’ which is a vector of the importance for each group.
Baptiste Gregorutti
Gregorutti, B., Michel, B. and Saint Pierre, P. (2015). Grouped variable importance with random forests and application to multiple functional data analysis, Computational Statistics and Data Analysis 90, 15-35.
selectGroup
,selectLevel
,selectFunctional
,plot.importance
1 2 3 4 5 6 7 8 9 10 11 | data(toyClassif)
attach(toyClassif)
rf <- randomForest(x=X,y=Y,keep.forest=TRUE, keep.inbag=TRUE, ntree=500)
ngroups <- 3
nvarGroup <- c(4,3,6)
idxGroup <- list(c(0,1,2,5), c(2,4,5), c(0,1,5,6,7,8))
grImp <- varImpGroup(rf, X, ngroups, nvarGroup, idxGroup, NULL, normalize=FALSE )
cat("Group importance\n", grImp, "\n")
detach(toyClassif)
|
Loading required package: randomForest
randomForest 4.6-12
Type rfNews() to see new features/changes/bug fixes.
Loading required package: wmtsa
Loading required package: fda
Loading required package: splines
Loading required package: Matrix
Attaching package: 'fda'
The following object is masked from 'package:graphics':
matplot
Group importance
0.2701206 0.1197495 0.1741828
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.