Class SampleSpace

java.lang.Object
network.aika.neuron.SampleSpace
All Implemented Interfaces:
Writable

public class SampleSpace extends Object implements Writable
The Sample Space keeps track of the number of training instances a certain neuron or synapse has encountered. The Sample Space is used to convert the counted frequencies to probabilities.
Author:
Lukas Molzberger
  • Constructor Details

    • SampleSpace

      public SampleSpace()
  • Method Details

    • getN

      public double getN(Range range)
    • setN

      public void setN(int N)
    • getLastPosition

      public Long getLastPosition()
    • setLastPosition

      public void setLastPosition(Long lastPosition)
    • applyMovingAverage

      public void applyMovingAverage(double alpha)
    • countSkippedInstances

      public void countSkippedInstances(Range range)
    • count

      public void count()
    • updateLastPosition

      public void updateLastPosition(Range absoluteRange)
    • getInactiveInstancesSinceLastPos

      public long getInactiveInstancesSinceLastPos(Range absoluteRange)
    • 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
      Parameters:
      out - DataOuput to serialize this object into.
      Throws:
      IOException
    • read

      public static SampleSpace read(DataInput in, Model m) throws IOException
      Throws:
      IOException
    • readFields

      public void readFields(DataInput in, Model m) throws IOException
      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
      Parameters:
      in - DataInput to deseriablize this object from.
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object