Package network.aika.neuron
Class Neuron<S extends Synapse,A extends Activation>
java.lang.Object
network.aika.neuron.Neuron<S,A>
- All Implemented Interfaces:
Writable
- Direct Known Subclasses:
ConjunctiveNeuron
,DisjunctiveNeuron
public abstract class Neuron<S extends Synapse,A extends Activation>
extends Object
implements Writable
- Author:
- Lukas Molzberger
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected DoubleField
protected double
protected TreeMap<NeuronProvider,
S> protected boolean
protected final ReadWriteLock
protected TreeMap<NeuronProvider,
Synapse> protected SampleSpace
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
void
addInputSynapse
(S s) void
void
applyMovingAverage
(double alpha) protected void
biasUpdate
(double u) boolean
boolean
boolean
void
count
(Activation act) abstract A
abstract ActivationFunction
getBias()
double
double
double
getFrequency
(Sign s, double n) getId()
getLabel()
getLock()
<M extends Model>
MgetModel()
double
getProbability
(Sign s, double n, boolean addCurrentInstance) long
double
getSurprisal
(Sign s, Range range, boolean addCurrentInstance) getTargetSynapses
(Direction dir, boolean template) protected void
abstract Neuron<?,
?> instantiateTemplate
(boolean addProvider) boolean
boolean
boolean
boolean
void
void
reactivate
(Model m) static Neuron
void
readFields
(DataInput in, Model m) Deserialize the fields of this object fromin
.void
void
void
void
void
setAllowTraining
(boolean allowTraining) void
setCustomData
(Writable customData) void
setFrequency
(double f) void
void
void
setNetworkInput
(boolean networkInput) void
void
suspend()
boolean
templateNeuronMatches
(Neuron<?, ?> targetN) toString()
void
void
write
(DataOutput out) Serialize the fields of this object toout
.
-
Field Details
-
bias
-
inputSynapses
-
outputSynapses
-
lock
-
frequency
protected double frequency -
sampleSpace
-
isNetworkInput
protected boolean isNetworkInput -
allowTraining
protected boolean allowTraining
-
-
Constructor Details
-
Neuron
protected Neuron() -
Neuron
-
Neuron
-
-
Method Details
-
register
-
templateNeuronMatches
-
getActivations
-
getTemplateInfo
-
initFromTemplate
-
createActivation
-
instantiateTemplate
-
addInactiveLinks
-
getActivationFunction
-
isAllowTraining
public boolean isAllowTraining() -
setAllowTraining
public void setAllowTraining(boolean allowTraining) -
isTemplate
public boolean isTemplate() -
getTemplate
-
getTemplateGroup
-
getOutputSynapse
-
biasUpdate
protected void biasUpdate(double u) -
getCandidateGradient
-
getSampleSpace
-
getProvider
-
setProvider
-
getInputSynapses
-
getOutputSynapses
-
setNetworkInput
public void setNetworkInput(boolean networkInput) -
isNetworkInput
public boolean isNetworkInput() -
containsInputSynapse
-
containsOutputSynapse
-
getTargetSynapses
-
getInputSynapse
-
addInputSynapse
-
removeInputSynapse
-
addOutputSynapse
-
removeOutputSynapse
-
getId
-
getLabel
-
setLabel
-
getCustomData
-
setCustomData
-
getModel
-
getRetrievalCount
public long getRetrievalCount() -
setModified
public void setModified() -
resetModified
public void resetModified() -
isModified
public boolean isModified() -
limitBias
public void limitBias() -
getBias
-
getLock
-
count
-
applyMovingAverage
public void applyMovingAverage(double alpha) -
getSurprisal
-
getProbability
-
getFrequency
public double getFrequency() -
getFrequency
-
setFrequency
public void setFrequency(double f) -
checkTemplateInductionThreshold
-
reactivate
-
suspend
public void suspend() -
updateAllowPropagate
public void updateAllowPropagate() -
write
Description copied from interface:Writable
Serialize the fields of this object toout
.- Specified by:
write
in interfaceWritable
- Parameters:
out
-DataOuput
to serialize this object into.- Throws:
IOException
-
read
- Throws:
Exception
-
readFields
Description copied from interface:Writable
Deserialize the fields of this object fromin
.For efficiency, implementations should attempt to re-use storage in the existing object where possible.
- Specified by:
readFields
in interfaceWritable
- Parameters:
in
-DataInput
to deseriablize this object from.- Throws:
Exception
-
toKeyString
-
toString
-