Performs both input and hidden layer selection for neural networks.
Usage
selectnn(...)
# S3 method for default
selectnn(
X,
y,
Q,
n_init,
inf_crit = "BIC",
task = "regression",
unif = 3,
maxit = 1000,
...
)
# S3 method for formula
selectnn(formula, data, ...)
Arguments
- ...
arguments passed to or from other methods
- X
Matrix of covariates
- y
Vector of response
- Q
Candidate number of hidden nodes
- n_init
Number of random initialisations (tracks)`
- inf_crit
Information criterion:
"BIC"
(default),"AIC"
or"AICc"
- task
"regression"
(default) or"classification"
- unif
Random initial values max value
- maxit
maximum number of iterations for nnet (default = 100)
- formula
A formula of the form: response ~ x1 + x2 + ...
- data
Data frame from which variables specified in formula are to be taken
Value
A list with information of the optimal model.
W_opt
- vector of selected weights.value
- value of"inf_crit"
for selected model.nn_hidden
- list of hidden node selection results.nn_input
- list of input node selection results.n_rep_h
- number of hidden node selection steps.n_rep_i
- number of input node selection steps.X
- matrix of the important covariates found.X_full
- matrix of all covariates.dropped
- vector of unimportant covariates.hidden_size
- vector of hidden layer size found at each step.