guess: Guess

View source: R/guess.r

guessR Documentation

Guess

Description

Infers the category of a new observation.

Usage

  guess(nn, X)

Arguments

nn

A trained and smoothed Probabilistic neural network.

X

A vector describing a new observation.

Details

Given an already trained and smoothed Probabilistic neural network, the function guess gives the category with the highest probability, and the probabilities of each category.

Value

A list of the guessed category and the probabilities of each category.

See Also

pnn-package, learn, smooth, perf, norms

Examples

library(pnn)
data(norms)
pnn <- learn(norms)
pnn <- smooth(pnn, sigma=0.8)
guess(pnn, c(1,1))
guess(pnn, c(1,1))$category
guess(pnn, c(1,1))$probabilities
guess(pnn, c(2,1))
guess(pnn, c(1.5,1))

chasset/pnn documentation built on March 24, 2022, 7 a.m.