Description Usage Arguments Value See Also Examples
View source: R/pnn.predone.R View source: R/pnn.predonev1.R
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
| 1 2 3 | pnn.predone(net, x)
pnn.predone(net, x)
 | 
| net | A PNN object created by pnn.fit() | 
| x | A vector of input predictors | 
A one-row matrix of predicted probabilities
A one-row matrix of predicted probabilities
| 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, ]))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.