Learn R Programming

yap (version 0.1.1)

pnn.x_imp: Derive the importance of a predictor used in the PNN

Description

The function pnn.x_imp derives the importance of a predictor used in the PNN, where the "importance" is measured by the increase in cross entropy after eliminating the impact of the predictor in interest.

Usage

pnn.x_imp(net, i)

Arguments

net

A PNN object generated by pnn.fit()

i

The ith predictor in the PNN

Value

A vector with the variable name and two values of importance measurements, namely "imp1" and "imp2". The "imp1" measures the increase in cross entropy after replacing all values of the predictor with its mean. The "imp2" measures the increase in cross entropy after dropping the predictor from the PNN.

See Also

pnn.x_pfi

Examples

Run this code
# NOT RUN {
data(iris, package = "datasets")
Y <- iris[, 5]
X <- scale(iris[, 1:4])
pnet <- pnn.fit(x = X, y = Y)
pnn.x_imp(pnet, 1)
# }

Run the code above in your browser using DataLab