public class LinearRule extends NeuronUpdateRule implements BiasedUpdateRule, DifferentiableUpdateRule, BoundedUpdateRule, ClippableUpdateRule, NoisyUpdateRule
NeuronUpdateRule.InputType
DEFAULT_INCREMENT, increment, inputType
Constructor and Description |
---|
LinearRule() |
Modifier and Type | Method and Description |
---|---|
double |
clip(double val)
Clip the current activation.
|
void |
contextualDecrement(Neuron n)
Decrement a neuron by increment, respecting neuron specific constraints.
|
void |
contextualIncrement(Neuron n)
Increment a neuron by increment, respecting neuron specific constraints.
|
LinearRule |
deepCopy()
Returns a deep copy of the update rule.
|
boolean |
getAddNoise()
Return true if add noise is turned on.
|
double |
getBias() |
double |
getDerivative(double val)
The inverse of the activation function.
|
java.lang.String |
getDescription()
Returns a brief description of this update rule.
|
double |
getLowerBound()
Returns the lower bound.
|
Randomizer |
getNoiseGenerator()
Return the noise generator.
|
double |
getSlope() |
Network.TimeType |
getTimeType()
Returns the type of time update (discrete or continuous) associated with
this neuron.
|
double |
getUpperBound()
Returns the upper bound.
|
boolean |
isClipped()
Is clipping turned on or not.
|
void |
setAddNoise(boolean addNoise)
Set whether noise should be used.
|
void |
setBias(double bias) |
void |
setClipped(boolean clipping)
Turn clipping on and off.
|
void |
setLowerBound(double lowerBound)
Sets the lower bound of this neuron update rule's activation.
|
void |
setNoiseGenerator(Randomizer noise)
Set the noise generator.
|
void |
setSlope(double slope) |
void |
setUpperBound(double upperBound)
Sets the upper bound of this neuron update rule's activation.
|
void |
update(Neuron neuron)
Apply the update rule.
|
clear, decrementActivation, getDefaultIncrement, getGraphicalLowerBound, getGraphicalUpperBound, getIncrement, getInputType, getRandomValue, getToolTipText, incrementActivation, isSkipsSynapticUpdates, isSpikingNeuron, setIncrement, setInputType
public Network.TimeType getTimeType()
getTimeType
in class NeuronUpdateRule
public LinearRule deepCopy()
deepCopy
in class NeuronUpdateRule
public void update(Neuron neuron)
update
in class NeuronUpdateRule
neuron
- parent neuronpublic double clip(double val)
clip
in interface ClippableUpdateRule
val
- the value to clippublic void contextualIncrement(Neuron n)
contextualIncrement
in class NeuronUpdateRule
n
- neuron to be incrementedpublic void contextualDecrement(Neuron n)
contextualDecrement
in class NeuronUpdateRule
n
- neuronpublic double getDerivative(double val)
getDerivative
in interface DifferentiableUpdateRule
val
- the value being sent through the neuron's derivativepublic double getBias()
getBias
in interface BiasedUpdateRule
public void setBias(double bias)
setBias
in interface BiasedUpdateRule
bias
- The bias to set.public double getSlope()
public void setSlope(double slope)
slope
- The slope to set.public Randomizer getNoiseGenerator()
NoisyUpdateRule
getNoiseGenerator
in interface NoisyUpdateRule
public void setNoiseGenerator(Randomizer noise)
NoisyUpdateRule
setNoiseGenerator
in interface NoisyUpdateRule
noise
- The noise generator to set.public boolean getAddNoise()
NoisyUpdateRule
getAddNoise
in interface NoisyUpdateRule
public void setAddNoise(boolean addNoise)
NoisyUpdateRule
setAddNoise
in interface NoisyUpdateRule
addNoise
- The addNoise to set.public java.lang.String getDescription()
NeuronUpdateRule
getDescription
in class NeuronUpdateRule
public double getUpperBound()
BoundedUpdateRule
getUpperBound
in interface BoundedUpdateRule
public double getLowerBound()
BoundedUpdateRule
getLowerBound
in interface BoundedUpdateRule
public void setUpperBound(double upperBound)
BoundedUpdateRule
setUpperBound
in interface BoundedUpdateRule
upperBound
- the upper boundpublic void setLowerBound(double lowerBound)
BoundedUpdateRule
setLowerBound
in interface BoundedUpdateRule
lowerBound
- the lower boundpublic boolean isClipped()
ClippableUpdateRule
isClipped
in interface ClippableUpdateRule
public void setClipped(boolean clipping)
ClippableUpdateRule
setClipped
in interface ClippableUpdateRule
clipping
- true if clipping should be on; false otherwise