smooth | R Documentation |
Work around the smoothing parameter.
smooth(nn, sigma, limits = c(0, 10))
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. |
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.
A trained and smoothed Probabilistic neural network.
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.
pnn-package
, learn
,
perf
, guess
,
norms
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.