gov.sandia.cognition.learning.function.vector
Class EntropyEvaluator

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.function.vector.EntropyEvaluator
All Implemented Interfaces:
Evaluator<Vector,Double>, CloneableSerializable, Serializable, Cloneable

public class EntropyEvaluator
extends AbstractCloneableSerializable
implements Evaluator<Vector,Double>

Takes a vector of inputs and computes the log base 2 entropy of the input. The values of the input must sum to 1.0 (L1 norm).

Since:
3.0
Author:
Kevin R. Dixon
See Also:
Serialized Form

Field Summary
static double TOLERANCE
          Tolerance for asserting equal to 1.0, 1.0E-5.
 
Constructor Summary
EntropyEvaluator()
          Creates a new instance of EntropyEvaluator
 
Method Summary
 Double evaluate(Vector input)
          Evaluates the function on the given input and returns the output.
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOLERANCE

public static final double TOLERANCE
Tolerance for asserting equal to 1.0, 1.0E-5.

See Also:
Constant Field Values
Constructor Detail

EntropyEvaluator

public EntropyEvaluator()
Creates a new instance of EntropyEvaluator

Method Detail

evaluate

public Double evaluate(Vector input)
Description copied from interface: Evaluator
Evaluates the function on the given input and returns the output.

Specified by:
evaluate in interface Evaluator<Vector,Double>
Parameters:
input - The input to evaluate.
Returns:
The output produced by evaluating the input.