Compute the permutation importance of a group from a modified CARTGV tree. Used only by the function rfgv when grp.importance=TRUE.

grpimpperm.rf(num_group, data, oobsamples, group, tree, impurityacc)

Arguments

num_group

index of the considered group

data

a data frame containing all observation included in the training data set.

oobsamples

a vector containing the indices of the observations that are not included in the sample used to build the modified CARTGV tree.

group

a vector with the group number of each variable. (WARNING : if there are "p" goups, the groups must be numbers from "1" to "p" in increasing order. The group label of the response variable is missing (i.e. NA)).

tree

the output of the function cartgv.rf.

impurityacc

the accurancy value of the modified CARTGV tree.

Value

DecreaseAcc the decrease in accurance from permuting the values of the considered group.