smooth: Smooth

Description Usage Arguments Details Value References See Also Examples

Description

Work around the smoothing parameter.

Usage

1
  smooth(nn, sigma, limits = c(0, 10))

Arguments

nn

A trained Probabilist neural network.

limits

Optional. A vector giving the interval (minimum, maximum) in which the function has to search the best value.

sigma

Optional. If the value is already known, it sets directly the parameter and do not search for the best value.

Details

The function smooth aims to help to set the smoothing parameter for a Probabilist neural network. If you have no idea of which value it can be, you can let the function finds the best value using a genetic algorithm. This can be done providing to the function only the parameter nn. This search takes some time, so if you have already an idea of the value, you can set it if you provide both parameters nn and sigma. If you want to check visually how fit is the sigma value, you can get a plot if you provide nn and set plot to TRUE. It sets the parameters sigma of the neural network.

Value

A trained and smoothed Probabilistic neural network.

References

Walter Mebane, Jr. and Jasjeet S. Sekhon. 2011. Genetic Optimization Using Derivatives: The rgenoud package for R. Journal of Statistical Software, 42(11): 1-26.

See Also

pnn-package, learn, perf, guess, norms

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(pnn)
data(norms)

# Search the best value
pnn <- learn(norms)
## Not run: pnn <- smooth(pnn)
## Not run: pnn$sigma

# Or set the value
pnn <- smooth(pnn, sigma=0.8)
pnn$sigma

chasset/pnn documentation built on May 13, 2019, 3:37 p.m.