|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.minorthird.classify.OnlineClassifierLearner
public abstract class OnlineClassifierLearner
Abstract ClassifierLearner which instantiates the teacher-learner protocol so as to implement a standard on-line learner.
Constructor Summary | |
---|---|
OnlineClassifierLearner()
|
Method Summary | |
---|---|
abstract 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. |
abstract Classifier |
getClassifier()
Subclasses should use this method to return the current classifier. |
boolean |
hasNextQuery()
Returns true if the learner has more queries to answer. |
Instance |
nextQuery()
Returns an Instance for which the learner would like a label. |
abstract void |
reset()
'forget' everything about the last learning task, and start a new task. |
void |
setInstancePool(java.util.Iterator<Instance> i)
Accept a set of unlabeled instances. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.cmu.minorthird.classify.ClassifierLearner |
---|
getSchema, setSchema |
Constructor Detail |
---|
public OnlineClassifierLearner()
Method Detail |
---|
public final void setInstancePool(java.util.Iterator<Instance> i)
ClassifierLearner
Learners need not make use of the instance pool.
setInstancePool
in interface ClassifierLearner
public final boolean hasNextQuery()
ClassifierLearner
Learners may always return 'false', if they are not active.
hasNextQuery
in interface ClassifierLearner
public final Instance nextQuery()
ClassifierLearner
This will only be called if hasNextQuery() returns true.
nextQuery
in interface ClassifierLearner
public ClassifierLearner copy()
ClassifierLearner
copy
in interface ClassifierLearner
public void completeTraining()
completeTraining
in interface ClassifierLearner
public abstract void addExample(Example answeredQuery)
addExample
in interface ClassifierLearner
public abstract Classifier getClassifier()
getClassifier
in interface ClassifierLearner
public abstract void reset()
reset
in interface ClassifierLearner
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |