|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.classify.OneVsAllLearner edu.cmu.minorthird.classify.CascadingBinaryLearner
public class CascadingBinaryLearner
Multi-class version of a binary classifier. Puts classifiers in order of ones with the most positive examples first.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class edu.cmu.minorthird.classify.OneVsAllLearner |
---|
OneVsAllLearner.IllegalArgumentException |
Field Summary | |
---|---|
java.lang.String[] |
sortedClassNames
|
Fields inherited from class edu.cmu.minorthird.classify.OneVsAllLearner |
---|
innerLearner, learner, learnerFactory, learnerName, schema |
Constructor Summary | |
---|---|
CascadingBinaryLearner()
|
|
CascadingBinaryLearner(BatchClassifierLearner learner)
|
|
CascadingBinaryLearner(ClassifierLearnerFactory learnerFactory)
Deprecated. use CascadingBinaryLearner(BatchClassifierLearner learner) |
|
CascadingBinaryLearner(java.lang.String l)
|
Method Summary | |
---|---|
void |
addExample(Example answeredQuery)
Accept a labeled example. |
void |
completeTraining()
Accept a signal that no more training data is available. |
Classifier |
getClassifier()
Return the learned classifier. |
void |
setSchema(ExampleSchema schema)
Accept an ExampleSchema - constraints on what the Examples will be. |
Methods inherited from class edu.cmu.minorthird.classify.OneVsAllLearner |
---|
copy, getInnerLearner, getSchema, hasNextQuery, nextQuery, reset, setInnerLearner, setInstancePool |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String[] sortedClassNames
Constructor Detail |
---|
public CascadingBinaryLearner()
public CascadingBinaryLearner(ClassifierLearnerFactory learnerFactory)
learnerFactory
- a ClassifierLearnerFactory which should produce a BinaryClassifier with each call.public CascadingBinaryLearner(java.lang.String l)
public CascadingBinaryLearner(BatchClassifierLearner learner)
Method Detail |
---|
public void setSchema(ExampleSchema schema)
ClassifierLearner
setSchema
in interface ClassifierLearner
setSchema
in class OneVsAllLearner
public void addExample(Example answeredQuery)
ClassifierLearner
All learners must provide a non-trivial implementation of addExample.
addExample
in interface ClassifierLearner
addExample
in class OneVsAllLearner
public void completeTraining()
ClassifierLearner
completeTraining
in interface ClassifierLearner
completeTraining
in class OneVsAllLearner
public Classifier getClassifier()
ClassifierLearner
All learners must implement this method.
getClassifier
in interface ClassifierLearner
getClassifier
in class OneVsAllLearner
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |