|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.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 ClassifierLearnerpublic final void reset()
ClassifierLearner
reset in interface ClassifierLearnerpublic final void setSchema(ExampleSchema schema)
ClassifierLearner
setSchema in interface ClassifierLearnerpublic final ExampleSchema getSchema()
ClassifierLearner
getSchema in interface ClassifierLearnerpublic final void setInstancePool(java.util.Iterator<Instance> i)
ClassifierLearnerLearners need not make use of the instance pool.
setInstancePool in interface ClassifierLearnerpublic final boolean hasNextQuery()
ClassifierLearnerLearners may always return 'false', if they are not active.
hasNextQuery in interface ClassifierLearnerpublic final Instance nextQuery()
ClassifierLearnerThis will only be called if hasNextQuery() returns true.
nextQuery in interface ClassifierLearnerpublic void addExample(Example example)
ClassifierLearnerAll learners must provide a non-trivial implementation of addExample.
addExample in interface ClassifierLearnerpublic final void completeTraining()
ClassifierLearner
completeTraining in interface ClassifierLearnerpublic Classifier getClassifier()
ClassifierLearnerAll 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 | ||||||||