nn_fit | R Documentation |
Fits n_init tracks with different initial values and decides on best model based on information criteria.
nn_fit(...)
## Default S3 method:
nn_fit(
x,
y,
q,
n_init,
inf_crit = "BIC",
lambda = 0,
response = "continuous",
unif = 3,
maxit = 1000,
pkg = "nnet",
...
)
## S3 method for class 'formula'
nn_fit(
formula,
data,
q,
n_init,
inf_crit = "BIC",
lambda = 0,
response = "continuous",
unif = 3,
maxit = 1000,
pkg = "nnet",
...
)
... |
additional argument for nnet |
x |
Matrix of covariates |
y |
Vector of response |
q |
Number of hidden nodes |
n_init |
Number of random initialisations (tracks) |
inf_crit |
Information criterion: |
lambda |
Ridge penalty |
response |
Response type: |
unif |
Random initial values max value |
maxit |
Maximum number of iterations for nnet (default = 100) |
pkg |
Package for fitting neural network. One of |
formula |
An object of class |
data |
A data frame containing the variables in the model |
The best model from the different initialisations
A list with estimates and estimated standard errors.
W_opt
- vector of optimal weights.
value
- value of best information criterion.
inf_crit_vec
- value of information criterion for each
initialisation.
convergence
- value of network convergence for each
initialisation (1 if maxmium iterations reached, 0 if not).
nn
- optimal nnet
object.
interpretnn object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.