pnn.x_pfi: Derive the permutation feature importance of a predictor used...

Description Usage Arguments Value See Also Examples

View source: R/pnn.x_pfi.R

Description

The function pnn.x_pfi derives the permutation feature importance (PFI) of a predictor used in the PNN, where the "importance" is deined by the increase in cross entropy after the predictor is randomly permutated.

Usage

1
pnn.x_pfi(net, i, ntry = 1000, seed = 1)

Arguments

net

A PNN object generated by pnn.fit()

i

The ith predictor in the PNN

ntry

The number of random permutations to try, 1e3 times by default

seed

The seed value for the random permutation

Value

A vector with the variable name and the PFI value.

See Also

pnn.x_imp

Examples

1
2
3
4
5
data(iris, package = "datasets")
Y <- iris[, 5]
X <- scale(iris[, 1:4])
pnet <- pnn.fit(x = X, y = Y)
pnn.x_pfi(pnet, 1)

yap documentation built on Oct. 26, 2020, 1:06 a.m.

Related to pnn.x_pfi in yap...