|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.classify.algorithms.active.QueryByCommittee
public class QueryByCommittee
Implements the query-by-committee algorithm, using bagging to generate a committee.
Constructor Summary | |
---|---|
QueryByCommittee()
|
|
QueryByCommittee(BatchClassifierLearner learner,
int committeeSize)
|
Method Summary | |
---|---|
void |
addExample(Example example)
Accept a labeled example. |
void |
completeTraining()
Accept a signal that no more training data is available. |
ClassifierLearner |
copy()
Make a copy of the learner. |
Classifier |
getClassifier()
Return the learned classifier. |
ExampleSchema |
getSchema()
Returns the ExampleSchema - constraints on what the Examples will be. |
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. |
void |
reset()
Forget everything and prepare for a new learning session. |
void |
setInstancePool(java.util.Iterator<Instance> i)
Accept a set of unlabeled instances. |
void |
setSchema(ExampleSchema schema)
Accept an ExampleSchema - constraints on what the Examples will be. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryByCommittee()
public QueryByCommittee(BatchClassifierLearner learner, int committeeSize)
Method Detail |
---|
public ClassifierLearner copy()
ClassifierLearner
copy
in interface ClassifierLearner
public final void reset()
ClassifierLearner
reset
in interface ClassifierLearner
public final void setSchema(ExampleSchema schema)
ClassifierLearner
setSchema
in interface ClassifierLearner
public final ExampleSchema getSchema()
ClassifierLearner
getSchema
in interface ClassifierLearner
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 void addExample(Example example)
ClassifierLearner
All learners must provide a non-trivial implementation of addExample.
addExample
in interface ClassifierLearner
public final void completeTraining()
ClassifierLearner
completeTraining
in interface ClassifierLearner
public Classifier getClassifier()
ClassifierLearner
All learners must implement this method.
getClassifier
in interface ClassifierLearner
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |