Learn R Programming

yap (version 0.1.1)

pnn.predict: Calculate a matrix of predicted probabilities

Description

The function pnn.predict calculates a matrix of predicted probabilities based on a matrix of predictors

Usage

pnn.predict(net, x)

Arguments

net

The PNN object generated by pnn.fit()

x

The matrix of input predictors

Value

A matrix of predicted probabilities for all categories

See Also

pnn.predone

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.predict(pnet, X[seq(5), ])
# }

Run the code above in your browser using DataLab