com.penguinwerks.jodene.calculators
Class ClassificationErrorCalculator

java.lang.Object
  extended bycom.penguinwerks.jodene.ErrorCalculator
      extended bycom.penguinwerks.jodene.calculators.ClassificationErrorCalculator

public class ClassificationErrorCalculator
extends ErrorCalculator

This error calculator assumes that your are measuring memership in a class. The expected and actual values are rounded and subtracted. If the result is 0, then there was perfect classification. Anything other than zero is the count of values that were incorrect.

Author:
Paul Hoehne

Constructor Summary
ClassificationErrorCalculator()
          Creates a new instance of ClassificationErrorCalculator
 
Method Summary
 double calculateError(java.util.Map expected, java.util.Map actual)
          Calculates the error by rounding the expected values and the actual values and subtracting.
 java.lang.String getDefaultName()
          Returns the the default name of the classification error calculator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassificationErrorCalculator

public ClassificationErrorCalculator()
Creates a new instance of ClassificationErrorCalculator

Method Detail

calculateError

public double calculateError(java.util.Map expected,
                             java.util.Map actual)
Calculates the error by rounding the expected values and the actual values and subtracting. A 0 indicates perfect classification, otherwise the value indicates the number of values that were incorrect.

Specified by:
calculateError in class ErrorCalculator
Parameters:
expected - The expected values from the example.
actual - The actual values obtained by training the network.
Returns:
The error in classification.

getDefaultName

public java.lang.String getDefaultName()
Returns the the default name of the classification error calculator.

Specified by:
getDefaultName in class ErrorCalculator
Returns:
The default name.