pnn-package: PNN

Description Details Author(s) References See Also Examples

Description

Probabilistic neural network.

Details

The package PNN implements the algorithm proposed by Specht (1990). It is written in the statistical langage R. It solves a common problem in automatic learning. Knowing a set of observations described by a vector of quantitative variables, we classify them in a given number of groups. Then, the algorithm is trained with this datasets and should guess afterwards the group of any new observation. This neural network has the main advantage to begin generalization instantaneously even with a small set of known observations.

The package PNN exports four functions. These funtions are documented with examples and provided with unit tests:

To help the use of PNN, the package contains a dataset norms. You could find more documentation at the package website: http://flow.chasset.net/pnn/.

The Probabilist neural network ist the main object used by the four functions. It is a list with several description fields:

Author(s)

Pierre-Olivier Chasset

References

Specht D.F. (1990). Probabilistic neural networks. Neural networks, 3(1):109-118.

See Also

learn, smooth, perf, guess, norms

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
library(pnn)
data(norms)

# The long way
pnn <- learn(norms)
pnn <- smooth(pnn, sigma=0.9)
pnn$sigma
## Not run: pnn <- perf(pnn) # Optional
## Not run: pnn$success_rate # Optional
guess(pnn, c(1,1))
guess(pnn, c(2,1))
guess(pnn, c(1.5,1))

# The short way
guess(smooth(learn(norms), sigma=0.8), c(1,1))
guess(smooth(learn(norms), sigma=0.8), c(2,1))
guess(smooth(learn(norms), sigma=0.8), c(1.5,1))

# Demonstrations
## Not run: demo("norms-trainingset", "pnn")
## Not run: demo("small-trainingset", "pnn")

Example output

Attaching package: 'pnn'

The following object is masked from 'package:stats':

    smooth

[1] 0.9
$category
[1] "A"

$probabilities
        A         B 
0.5349252 0.4650748 

$category
[1] "B"

$probabilities
        A         B 
0.4592704 0.5407296 

$category
[1] "B"

$probabilities
        A         B 
0.4976347 0.5023653 

$category
[1] "A"

$probabilities
        A         B 
0.5532007 0.4467993 

$category
[1] "B"

$probabilities
        A         B 
0.4399107 0.5600893 

$category
[1] "B"

$probabilities
        A         B 
0.4975773 0.5024227 

pnn documentation built on May 2, 2019, 9:30 a.m.