Package network.aika.neuron
Class SampleSpace
java.lang.Object
network.aika.neuron.SampleSpace
- All Implemented Interfaces:
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyMovingAverage
(double alpha) void
count()
void
countSkippedInstances
(Range range) long
getInactiveInstancesSinceLastPos
(Range absoluteRange) double
static SampleSpace
void
readFields
(DataInput in, Model m) Deserialize the fields of this object fromin
.void
setLastPosition
(Long lastPosition) void
setN
(int N) toString()
void
updateLastPosition
(Range absoluteRange) void
write
(DataOutput out) Serialize the fields of this object toout
.
-
Constructor Details
-
SampleSpace
public SampleSpace()
-
-
Method Details
-
getN
-
setN
public void setN(int N) -
getLastPosition
-
setLastPosition
-
applyMovingAverage
public void applyMovingAverage(double alpha) -
countSkippedInstances
-
count
public void count() -
updateLastPosition
-
getInactiveInstancesSinceLastPos
-
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:
IOException
-
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:
IOException
-
toString
-