powered by
The function pnn.predict calculates a matrix of predicted probabilities based on a matrix of predictors
pnn.predict
pnn.predict(net, x)
The PNN object generated by pnn.fit()
The matrix of input predictors
A matrix of predicted probabilities for all categories
pnn.predone
# 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