OutputType - The type of the output.@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 MostFrequentLearner<OutputType> extends AbstractCloneableSerializable implements SupervisedBatchLearner<java.lang.Object,OutputType,ConstantEvaluator<OutputType>>
MostFrequentLearner class implements a baseline learner that
computes the most frequent output value.| Constructor and Description |
|---|
MostFrequentLearner()
Creates a new
MostFrequentLearner. |
| Modifier and Type | Method and Description |
|---|---|
ConstantEvaluator<OutputType> |
learn(java.util.Collection<? extends InputOutputPair<? extends java.lang.Object,OutputType>> data)
Creates a constant evaluator that for the most frequent output value of
the given dataset.
|
cloneequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclonepublic MostFrequentLearner()
MostFrequentLearner.public ConstantEvaluator<OutputType> learn(java.util.Collection<? extends InputOutputPair<? extends java.lang.Object,OutputType>> data)
learn in interface BatchLearner<java.util.Collection<? extends InputOutputPair<? extends java.lang.Object,OutputType>>,ConstantEvaluator<OutputType>>data - The dataset of input-output pairs to use.