gov.sandia.cognition.learning.algorithm.baseline
Class WeightedMeanLearner

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.baseline.WeightedMeanLearner
All Implemented Interfaces:
BatchLearner<Collection<? extends InputOutputPair<? extends Object,Double>>,ConstantEvaluator<Double>>, SupervisedBatchLearner<Object,Double,ConstantEvaluator<Double>>, CloneableSerializable, Serializable, Cloneable

@CodeReview(reviewer="Kevin R. Dixon",
            date="2008-07-22",
            changesNeeded=false,
            comments={"Fixed a few typos in javadoc.","Removed implements Serializeable, as BatchLearner already does that.","I don\'t particularly like this class... I just don\'t think it\'s useful.","However, the code looks fine."})
public class WeightedMeanLearner
extends AbstractCloneableSerializable
implements SupervisedBatchLearner<Object,Double,ConstantEvaluator<Double>>

The WeightedMeanLearner class implements a baseline learner that computes the weighted mean output value.

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

Constructor Summary
WeightedMeanLearner()
          Creates a new MeanLearner.
 
Method Summary
 ConstantEvaluator<Double> learn(Collection<? extends InputOutputPair<?,Double>> data)
          Creates a constant evaluator for the weighted mean output value of the given dataset.
 
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
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Constructor Detail

WeightedMeanLearner

public WeightedMeanLearner()
Creates a new MeanLearner.

Method Detail

learn

public ConstantEvaluator<Double> learn(Collection<? extends InputOutputPair<?,Double>> data)
Creates a constant evaluator for the weighted mean output value of the given dataset.

Specified by:
learn in interface BatchLearner<Collection<? extends InputOutputPair<? extends Object,Double>>,ConstantEvaluator<Double>>
Parameters:
data - The dataset of input-output pairs to use.
Returns:
A constant evaluator for the weighted mean output value.