Function that permutate the values of a group of variables. Note that all the variables of the group are permuted together in order to keep the relationship between variables within the group.
perm(oobsamples, data, num_group, group)
oobsamples | a vector containing the indices of the observations that are not included in the sample used to build the modified CARTGV tree. |
---|---|
data | a data frame containing all observation included in the training data set. |
num_group | index of the considered group |
group | a vector with the group number of each variable. (WARNING : if there are " |
data_perm a data frame obtained after permuting the values of the considered group for observation belonging to the out-of-bag sample.