edu.cmu.minorthird.classify
Class ManyVsRestLearner
java.lang.Object
edu.cmu.minorthird.classify.OneVsAllLearner
edu.cmu.minorthird.classify.ManyVsRestLearner
- All Implemented Interfaces:
- ClassifierLearner, java.lang.Cloneable
public class ManyVsRestLearner
- extends OneVsAllLearner
Multi-class version of a binary classifier; Generalizes OneVsAllLearner.
OneVsAll allows one class with positive labels for each example, and the rest with negative labels.
In ManyVsRest, in each example many classes may be positive.
- Author:
- Vitor Carvalho.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ManyVsRestLearner
public ManyVsRestLearner()
ManyVsRestLearner
public ManyVsRestLearner(BatchClassifierLearner learner1)
ManyVsRestLearner
public ManyVsRestLearner(java.lang.String learnerName)
copy
public ClassifierLearner copy()
- Description copied from interface:
ClassifierLearner
- Make a copy of the learner.
Note: This will reset the learner, erasing previous data!
- Specified by:
copy
in interface ClassifierLearner
- Overrides:
copy
in class OneVsAllLearner
addExample
public void addExample(Example answeredQuery)
- Description copied from interface:
ClassifierLearner
- Accept a labeled example. The example might be the answer to the last query,
or it may be an example chosen by the teacher.
All learners must provide a non-trivial implementation of addExample.
- Specified by:
addExample
in interface ClassifierLearner
- Overrides:
addExample
in class OneVsAllLearner