com.weighscore.neuro.plugins
Class LastErrorStatistic

public class LastErrorStatistic
extends com.weighscore.neuro.Statistic
The class for holding and computing some average statistics that are used in Empiric Teacher
Version:
1.0
Author:
Fyodor Kravchenko
Field Detail

lastArraysFull

private boolean lastArraysFull
The flag indicating that the last error arrays are full

currErrCnt

private int currErrCnt
The last error position in the arrays

lastErrCnt

public int lastErrCnt
The size of an array of the last errors of this synapse or neuron

lastErrs

private double[] lastErrs
Last errors array

lastErrDevs

private double[] lastErrDevs
The array of last differences between errors and last average errors

lastAvgErr

public double lastAvgErr
the average value of the last lastErrCnt errors of this neuron or synapse

lastAvgErrAbs

public double lastAvgErrAbs
the average value of the last lastErrCnt absolute values of errors of this neuron or synapse

lastAvgErrDev

public double lastAvgErrDev
the average difference between the last lastErrCnt errors and the last lastErrCnt average errors

lastAvgErrDevAbs

public double lastAvgErrDevAbs
the average absolute difference between the last lastErrCnt errors and the last lastErrCnt average errors

Method Detail

initLastAvgErr

private synchronized void initLastAvgErr()
Initialize the last average errors array

initLastAvgErrDev

private synchronized void initLastAvgErrDev()
Initialize the array of last differences between errors and last average errors

areLastArraysFull

public boolean areLastArraysFull()
Tests whether the last error arrays are full
Returns:
whether the last error arrays are full

recordError

public synchronized void recordError(double error)
Record the neuron's error, update all averages
Parameters:
error - The error to record

setParameter

public synchronized void setParameter(java.lang.String statisticName,
                                      java.lang.String statistic)
Set the named statistic parameter of this statistic object; recalculate averages
Parameters:
statisticName - The name of the statistic
statistic - The new value of the statistic parameter