gov.sandia.cognition.learning.algorithm.ensemble
Class AveragingEnsemble<InputType,MemberType extends Evaluator<? super InputType,? extends Number>>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.ensemble.AbstractUnweightedEnsemble<MemberType>
          extended by gov.sandia.cognition.learning.algorithm.ensemble.AveragingEnsemble<InputType,MemberType>
Type Parameters:
InputType - The type of input the ensemble can take. Passed to each ensemble member to produce an output.
MemberType - The type of members of this ensemble.
All Implemented Interfaces:
Evaluator<InputType,Double>, Ensemble<MemberType>, Regressor<InputType>, ScalarFunction<InputType>, CloneableSerializable, Serializable, Cloneable

public class AveragingEnsemble<InputType,MemberType extends Evaluator<? super InputType,? extends Number>>
extends AbstractUnweightedEnsemble<MemberType>
implements Regressor<InputType>

An ensemble for regression functions that averages together the output value of each ensemble member to get the final output.

Since:
3.3.3
Author:
Justin Basilico
See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.ensemble.AbstractUnweightedEnsemble
members
 
Constructor Summary
AveragingEnsemble()
          Creates a new, empty AdditiveEnsemble.
AveragingEnsemble(List<MemberType> members)
          Creates a new AdditiveEnsemble with the given
 
Method Summary
 Double evaluate(InputType input)
          Evaluates the function on the given input and returns the output.
 double evaluateAsDouble(InputType input)
          Evaluates the scalar function as a double.
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.ensemble.AbstractUnweightedEnsemble
add, clone, getMemberCount, getMembers, setMembers
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AveragingEnsemble

public AveragingEnsemble()
Creates a new, empty AdditiveEnsemble.


AveragingEnsemble

public AveragingEnsemble(List<MemberType> members)
Creates a new AdditiveEnsemble with the given

Parameters:
members - The list of ensemble members.
Method Detail

evaluate

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

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

evaluateAsDouble

public double evaluateAsDouble(InputType input)
Description copied from interface: ScalarFunction
Evaluates the scalar function as a double.

Specified by:
evaluateAsDouble in interface ScalarFunction<InputType>
Parameters:
input - The input value.
Returns:
The scalar output calculated from the given input.