com.penguinwerks.jodene
Class Evaluator

java.lang.Object
  extended bycom.penguinwerks.jodene.Evaluator

public class Evaluator
extends java.lang.Object

Evaluates the network, using the error calculators to accumulate error information.

Author:
Paul Hoehne

Constructor Summary
Evaluator()
          Creates a new instance of Evaluator
 
Method Summary
 void addErrorCalculator(ErrorCalculator ec)
          Adds a new error calculator to the evaluator.
 void addErrorCalculator(ErrorCalculator ec, java.lang.String name)
          Add an error calculator with the given name, as opposed to the default name of the calculator.
 java.util.Map evaluate(Network network, ExampleSet examples)
          Evaluates the network, returning the evaluation of the error.
 double getError(java.lang.String name)
          Return the error for the given name.
 java.util.List getErrorNames()
          Returns the error names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Evaluator

public Evaluator()
Creates a new instance of Evaluator

Method Detail

addErrorCalculator

public void addErrorCalculator(ErrorCalculator ec)
Adds a new error calculator to the evaluator.

Parameters:
ec - The Error calculator.

addErrorCalculator

public void addErrorCalculator(ErrorCalculator ec,
                               java.lang.String name)
Add an error calculator with the given name, as opposed to the default name of the calculator.

Parameters:
ec - The error calculator.
name - The name of the error calculator.

getErrorNames

public java.util.List getErrorNames()
Returns the error names.

Returns:
the names of the errors.

getError

public double getError(java.lang.String name)
Return the error for the given name.

Parameters:
name - The name of the error.
Returns:
The error.

evaluate

public java.util.Map evaluate(Network network,
                              ExampleSet examples)
                       throws InvalidInputsException
Evaluates the network, returning the evaluation of the error.

Parameters:
network - The network to evaluate.
examples - The examples to use for evaluation.
Returns:
An error report for the evaluation.
Throws:
InvalidInputsException - Thrown if the input names for the network and the example set do not match.