OutputType
- The output type of the data.@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 WeightedMostFrequentLearner<OutputType> extends AbstractCloneableSerializable implements SupervisedBatchLearner<java.lang.Object,OutputType,ConstantEvaluator<OutputType>>
WeightedMostFrequentLearner
class implements a baseline learning
algorithm that finds the most frequent output of a given dataset based on
the weights of the examples.Constructor and Description |
---|
WeightedMostFrequentLearner()
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 based on the most frequent output in a given
collection of input-output pairs, taking the weight into account.
|
clone
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
public WeightedMostFrequentLearner()
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 data that the learning algorithm will use to create an
object of ResultType
.