Conscience bias learning function
[dB,LS] = learncon(B,P,Z,N,A,T,E,gW,gA,D,LP,LS)
info = learncon('
learncon is the conscience bias learning
function used to increase the net input to neurons that have the lowest
average output until each neuron responds approximately an equal percentage
of the time.
[dB,LS] = learncon(B,P,Z,N,A,T,E,gW,gA,D,LP,LS) takes
Learning parameters, none,
Learning state, initially should be =
New learning state
Learning occurs according to
learning parameter, shown here with its default value.
info = learncon(' returns
useful information for each supported
Names of learning parameters
Default learning parameters
Returns 1 if this function uses
Neural Network Toolbox™ 2.0 compatibility: The
above equals 1 minus the bias time constant used by
the Neural Network Toolbox 2.0 software.
Here you define a random output
A and bias
W for a layer with three neurons. You also
define the learning rate
a = rand(3,1); b = rand(3,1); lp.lr = 0.5;
learncon only needs these values
to calculate a bias change (see "Algorithm" below),
use them to do so.
dW = learncon(b,,,,a,,,,,,lp,)
To prepare the bias of layer
i of a custom
network to learn with
net.trainParam automatically becomes
net.adaptParam automatically becomes
.(Each weight learning parameter property is automatically set to
To train the network (or enable it to adapt),
properties as desired.
learncon calculates the bias change
a given neuron by first updating each neuron's conscience,
i.e., the running average of its output:
c = (1-lr)*c + lr*a
The conscience is then used to compute a bias for the neuron that is greatest for smaller conscience values.
b = exp(1-log(c)) - b
the bias values each time it is called.)