Re: Help using the exclude option in the neuralnet package
the easiest way to declare `exclude` and `constant.weights` is as a
vector of indices. You can determine the index of the neuron as follows:
The layers are arranged in sequence, with the bias neuron being the
first in each layer. So in a neural net with 6 input neurons and a layer
of 3 hidden neurons, the bias neurons would be at indices 1 and 8.
the exclude and constant.weights options are used as follows:
exclude: A matrix with n rows and 3 columns will exclude n weights. The the first column refers to the layer, the second column to the input neuron and the third column to the output neuron of the weight.
constant.weights: A vector specifying the values of the weights that are excluded from the training process and treated as fix.
Please refer to the following example:
Not using exclude and constant.weights (all weights are trained):