Class Neuron<S extends Synapse,A extends Activation>

All Implemented Interfaces:
Direct Known Subclasses:
ConjunctiveNeuron, DisjunctiveNeuron

public abstract class Neuron<S extends Synapse,A extends Activation> extends Object implements Writable
Lukas Molzberger
  • Field Details

  • Constructor Details

    • Neuron

      protected Neuron()
    • Neuron

      public Neuron(NeuronProvider p)
    • Neuron

      public Neuron(Model m, boolean addProvider)
  • Method Details

    • register

      public void register(A act)
    • templateNeuronMatches

      public boolean templateNeuronMatches(Neuron<?,?> targetN)
    • getActivations

      public SortedSet<A> getActivations(Thought t)
    • getTemplateInfo

      public TemplateNeuronInfo getTemplateInfo()
    • initFromTemplate

      protected void initFromTemplate(Neuron n)
    • createActivation

      public abstract A createActivation(Thought t)
    • instantiateTemplate

      public abstract Neuron<?,?> instantiateTemplate(boolean addProvider)
    • addInactiveLinks

      public abstract void addInactiveLinks(Activation act)
    • getActivationFunction

      public abstract ActivationFunction getActivationFunction()
    • isAllowTraining

      public boolean isAllowTraining()
    • setAllowTraining

      public void setAllowTraining(boolean allowTraining)
    • isTemplate

      public boolean isTemplate()
    • getTemplate

      public Neuron getTemplate()
    • getTemplateGroup

      public Set<Neuron> getTemplateGroup()
    • getOutputSynapse

      public Synapse getOutputSynapse(NeuronProvider n)
    • biasUpdate

      protected void biasUpdate(double u)
    • getCandidateGradient

      public double getCandidateGradient(Activation act)
    • getSampleSpace

      public SampleSpace getSampleSpace()
    • getProvider

      public NeuronProvider getProvider()
    • setProvider

      public void setProvider(NeuronProvider p)
    • getInputSynapses

      public Stream<S> getInputSynapses()
    • getOutputSynapses

      public Stream<? extends Synapse> getOutputSynapses()
    • setNetworkInput

      public void setNetworkInput(boolean networkInput)
    • isNetworkInput

      public boolean isNetworkInput()
    • containsInputSynapse

      public boolean containsInputSynapse(Synapse s)
    • containsOutputSynapse

      public boolean containsOutputSynapse(Synapse s)
    • getTargetSynapses

      public Stream<? extends Synapse> getTargetSynapses(Direction dir, boolean template)
    • getInputSynapse

      public Synapse getInputSynapse(NeuronProvider n)
    • addInputSynapse

      public void addInputSynapse(S s)
    • removeInputSynapse

      public void removeInputSynapse(S s)
    • addOutputSynapse

      public void addOutputSynapse(Synapse s)
    • removeOutputSynapse

      public void removeOutputSynapse(Synapse s)
    • getId

      public Long getId()
    • getLabel

      public String getLabel()
    • setLabel

      public void setLabel(String label)
    • getCustomData

      public Writable getCustomData()
    • setCustomData

      public void setCustomData(Writable customData)
    • getModel

      public <M extends Model> M getModel()
    • getRetrievalCount

      public long getRetrievalCount()
    • setModified

      public void setModified()
    • resetModified

      public void resetModified()
    • isModified

      public boolean isModified()
    • limitBias

      public void limitBias()
    • getBias

      public DoubleField getBias()
    • getLock

      public ReadWriteLock getLock()
    • count

      public void count(Activation act)
    • applyMovingAverage

      public void applyMovingAverage(double alpha)
    • getSurprisal

      public double getSurprisal(Sign s, Range range, boolean addCurrentInstance)
    • getProbability

      public double getProbability(Sign s, double n, boolean addCurrentInstance)
    • getFrequency

      public double getFrequency()
    • getFrequency

      public double getFrequency(Sign s, double n)
    • setFrequency

      public void setFrequency(double f)
    • checkTemplateInductionThreshold

      public boolean checkTemplateInductionThreshold(Activation act)
    • reactivate

      public void reactivate(Model m)
    • suspend

      public void suspend()
    • updateAllowPropagate

      public void updateAllowPropagate()
    • write

      public void write(DataOutput out) throws IOException
      Description copied from interface: Writable
      Serialize the fields of this object to out.
      Specified by:
      write in interface Writable
      out - DataOuput to serialize this object into.
    • read

      public static Neuron read(DataInput in, Model m) throws Exception
    • readFields

      public void readFields(DataInput in, Model m) throws Exception
      Description copied from interface: Writable
      Deserialize the fields of this object from in.

      For efficiency, implementations should attempt to re-use storage in the existing object where possible.

      Specified by:
      readFields in interface Writable
      in - DataInput to deseriablize this object from.
    • toKeyString

      public String toKeyString()
    • toString

      public String toString()
      toString in class Object