|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.classify.OnlineClassifierLearner edu.cmu.minorthird.classify.MistakeCountingOnlineLearner
public class MistakeCountingOnlineLearner
A wrapper around on OnlineClassifierLearner that counts the number of mistakes if makes.
Constructor Summary | |
---|---|
MistakeCountingOnlineLearner()
|
|
MistakeCountingOnlineLearner(OnlineClassifierLearner innerLearner)
|
|
MistakeCountingOnlineLearner(OnlineClassifierLearner innerLearner,
boolean reportMistakes)
|
Method Summary | |
---|---|
void |
addExample(Example answeredQuery)
Subclasses should use this method to perform whatever incremental update is needed after in response to a new example. |
void |
completeTraining()
A promise from the caller that no further examples will be added. |
ClassifierLearner |
copy()
Make a copy of the learner. |
Classifier |
getClassifier()
Subclasses should use this method to return the current classifier. |
int |
getNumberOfMistakes()
Report the number of mistakes made by the inner learner. |
ExampleSchema |
getSchema()
Returns the ExampleSchema - constraints on what the Examples will be. |
int |
getTotalNumberOfExamples()
Report the number of examples sent to the inner learner. |
void |
reset()
'forget' everything about the last learning task, and start a new task. |
void |
setSchema(ExampleSchema schema)
Accept an ExampleSchema - constraints on what the Examples will be. |
java.lang.String |
toString()
|
Methods inherited from class edu.cmu.minorthird.classify.OnlineClassifierLearner |
---|
hasNextQuery, nextQuery, setInstancePool |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MistakeCountingOnlineLearner()
public MistakeCountingOnlineLearner(OnlineClassifierLearner innerLearner)
public MistakeCountingOnlineLearner(OnlineClassifierLearner innerLearner, boolean reportMistakes)
Method Detail |
---|
public ClassifierLearner copy()
ClassifierLearner
copy
in interface ClassifierLearner
copy
in class OnlineClassifierLearner
public void completeTraining()
OnlineClassifierLearner
completeTraining
in interface ClassifierLearner
completeTraining
in class OnlineClassifierLearner
public void addExample(Example answeredQuery)
OnlineClassifierLearner
addExample
in interface ClassifierLearner
addExample
in class OnlineClassifierLearner
public Classifier getClassifier()
OnlineClassifierLearner
getClassifier
in interface ClassifierLearner
getClassifier
in class OnlineClassifierLearner
public void setSchema(ExampleSchema schema)
ClassifierLearner
public ExampleSchema getSchema()
ClassifierLearner
public void reset()
OnlineClassifierLearner
reset
in interface ClassifierLearner
reset
in class OnlineClassifierLearner
public int getNumberOfMistakes()
public int getTotalNumberOfExamples()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |