[R] Help using the exclude option in the neuralnet package

Sebastian Mueller he||o @end|ng |rom @eb@@t|@nm@dev
Sun Oct 11 03:23:43 CEST 2020


Hi Dan,

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.

HTH.

Sebastian



More information about the R-help mailing list