Description Usage Arguments Details Value References See Also
A localized version of single-hidden-layer neural networks, possibly with skip-layer connections.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | osnnet(x, ...)
## S3 method for class 'formula'
osnnet(formula, data, ..., subset,
na.action, contrasts = NULL)
## Default S3 method:
osnnet(x, y,
wf = c("biweight", "cauchy", "cosine", "epanechnikov", "exponential", "gaussian", "optcosine", "rectangular", "triangular"),
bw, k, nn.only = TRUE, size, Wts,
mask = rep(TRUE, length(wts)), linout = FALSE,
entropy = FALSE, softmax = FALSE, censored = FALSE,
skip = FALSE, rang = 0.7, decay = 0, maxit = 100,
trace = TRUE, MaxNWts = 1000, abstol = 1e-04,
reltol = 1e-08, ...)
|
formula |
A |
data |
A |
x |
(Required if no |
y |
(Required if no |
size |
Number of units in the hidden layer. Can be zero if there are skip-layer units. |
contrasts |
A list of contrasts to be used for some or all of the factors appearing as variables in the model formula. |
Wts |
Initial parameter vector. If missing chosen at random. |
mask |
Logical vector indicating which parameters should be optimized (default all). |
linout |
Switch for linear output units. Default logistic output units. |
entropy |
Switch for entropy (= maximum conditional likelihood) fitting. Default by least-squares. |
softmax |
Switch for softmax (log-linear model) and
maximum conditional likelihood fitting. |
censored |
A variant on |
skip |
Switch to add skip-layer connections from input to output. |
rang |
Initial random weights on [- |
decay |
Parameter for weight decay. Default 0. |
maxit |
Maximum number of iterations. Default 100. |
trace |
Switch for tracing optimization. Default
|
MaxNWts |
The maximum allowable number of weights.
There is no intrinsic limit in the code, but increasing
|
abstol |
Stop if the fit criterion falls below
|
reltol |
Stop if the optimizer is unable to reduce
the fit criterion by a factor of at least |
wf |
A window function which is used to calculate
weights that are introduced into the fitting process.
Either a character string or a function, e.g. |
bw |
(Required only if |
k |
(Required only if |
nn.only |
(Required only if |
... |
Arguments passed to or from other methods. |
subset |
An index vector specifying the cases to be used in the training sample. (NOTE: If given, this argument must be named.) |
na.action |
A function to specify the action to be
taken if NAs are found. The default action is first the
|
This is a localized version of neural networks where a
neural network is fitted for each test observation based
on the training data near the trial point. It is based on
the function nnet
from package
nnet.
The name of the window function (wf
) can be
specified as a character string. In this case the window
function is generated internally in
predict.osnnet
. Currently supported are
"biweight"
, "cauchy"
, "cosine"
,
"epanechnikov"
, "exponential"
,
"gaussian"
, "optcosine"
,
"rectangular"
and "triangular"
.
Moreover, it is possible to generate the window functions
mentioned above in advance (see
wfs
) and pass them to
osnnet
.
Any other function implementing a window function can
also be used as wf
argument. This allows the user
to try own window functions. See help on
wfs
for details.
If the predictor variables include factors, the formula interface must be used in order to get a correct model matrix.
An object of class "osnnet.formula"
or
"osnnet"
, a list
containing the following
components:
x |
A |
y |
If argument |
... |
|
mask |
The |
maxit |
The |
trace |
The |
abstol |
The |
reltol |
The |
lev |
If |
wf |
The window function used. Always a function, even if the input was a string. |
bw |
(Only if |
k |
(Only if |
nn.only |
(Logical. Only if |
adaptive |
(Logical.)
|
variant |
(Only if |
call |
The (matched) function call. |
Czogiel, I., Luebke, K., Zentgraf, M. and Weihs, C. (2007), Localized linear discriminant analysis. In Decker, R. and Lenz, H.-J., editors, Advances in Data Analysis, volume 33 of Studies in Classification, Data Analysis, and Knowledge Organization, pages 133–140, Springer, Berlin Heidelberg.
Ripley, B. D. (1996) Pattern Recognition and Neural Networks. Cambridge.
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.