edu.cmu.minorthird.classify
Class MostFrequentFirstLearner
java.lang.Object
edu.cmu.minorthird.classify.OneVsAllLearner
edu.cmu.minorthird.classify.MostFrequentFirstLearner
- All Implemented Interfaces:
- ClassifierLearner, java.lang.Cloneable
- Direct Known Subclasses:
- Recommended.MostFrequentFirstLearner
public class MostFrequentFirstLearner
- extends OneVsAllLearner
Multi-class version of a binary classifier. Puts classifiers in order of ones with
the most positive examples first.
- Author:
- Cameron Williams
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sortedClassNames
public java.lang.String[] sortedClassNames
MostFrequentFirstLearner
public MostFrequentFirstLearner()
MostFrequentFirstLearner
public MostFrequentFirstLearner(ClassifierLearnerFactory learnerFactory)
- Deprecated. use MostFrequentFirstLearner(BatchClassifierLearner learner)
- Parameters:
learnerFactory
- a ClassifierLearnerFactory which should produce a BinaryClassifier with each call.
MostFrequentFirstLearner
public MostFrequentFirstLearner(java.lang.String l)
MostFrequentFirstLearner
public MostFrequentFirstLearner(BatchClassifierLearner learner)
completeTraining
public void completeTraining()
- Description copied from interface:
ClassifierLearner
- Accept a signal that no more training data is available. This
would trigger any additional computation that might be useful
to speed up or improve the results of getClassifier().
- Specified by:
completeTraining
in interface ClassifierLearner
- Overrides:
completeTraining
in class OneVsAllLearner
getClassifier
public Classifier getClassifier()
- Description copied from interface:
ClassifierLearner
- Return the learned classifier. The classifier should take advantage of
all information sent by the teacher to date. Teachers can assume that
multiple calls to getClassifier() without intervening calls to addExample()
will return the same object, and do little computation. Teachers can
not assume that this object is immutable: for instance, in the case of
an on-line learning method, the classifier that is returned might
change after more examples are learned.
All learners must implement this method.
- Specified by:
getClassifier
in interface ClassifierLearner
- Overrides:
getClassifier
in class OneVsAllLearner