pnn.predone: Calculate the predicted probability for each category of PNN

Description Usage Arguments Value See Also Examples

View source: R/pnn.predone.R View source: R/pnn.predonev1.R

Description

The function pnn.predone calculates the predicted probability for each category of PNN

The function pnn.predone calculates the predicted probability for each category of PNN

Usage

1
2
3
pnn.predone(net, x)

pnn.predone(net, x)

Arguments

net

A PNN object created by pnn.fit()

x

A vector of input predictors

Value

A one-row matrix of predicted probabilities

A one-row matrix of predicted probabilities

See Also

pnn.fit

pnn.fit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(iris, package = "datasets")
Y <- iris[, 5]
X <- scale(iris[, 1:4])
pnet <- pnn.fit(x = X, y = Y)
for (i in seq(5)) print(pnn.predone(pnet, X[i, ]))
data(iris, package = "datasets")
Y <- iris[, 5]
X <- scale(iris[, 1:4])
pnet <- pnn.fit(x = X, y = Y)
for (i in seq(5)) print(pnn.predone(pnet, X[i, ]))

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

Related to pnn.predone in yap...