The function grnn.x_pfi derives the permutation feature importance (PFI) of a predictor used in the GRNN
grnn.x_pfi
grnn.x_pfi(net, i, class = FALSE, ntry = 1000, seed = 1)
The GRNN object generated by grnn.fit()
The ith predictor in the GRNN
TRUE or FALSE, whether it is for the classification or not
The number of random permutations to try, 1e3 times by default
The seed value for the random permutation
A vector with the variable name and the PFI value.
grnn.x_imp
# NOT RUN { data(iris, package = "datasets") Y <- ifelse(iris[, 5] == "setosa", 1, 0) X <- scale(iris[, 1:4]) gnet <- grnn.fit(x = X, y = Y) grnn.x_pfi(net = gnet, 1) # }
Run the code above in your browser using DataLab