edu.cmu.minorthird.classify
Class ClassifierTeacher

java.lang.Object
  extended by edu.cmu.minorthird.classify.ClassifierTeacher
Direct Known Subclasses:
DatasetClassifierTeacher, StackedClassifierTeacher

public abstract class ClassifierTeacher
extends java.lang.Object

Implements the teacher's side of the learner-teacher protocol.

Author:
William Cohen

Constructor Summary
ClassifierTeacher()
           
 
Method Summary
protected abstract  java.util.Iterator<Example> examplePool()
          Labeled instances that will be sent to the learner via a call to addExample().
protected abstract  boolean hasAnswers()
          Return true if this teacher can answer more queries.
protected abstract  java.util.Iterator<Instance> instancePool()
          Unlabeled instances, which will be provided to the learner via setInstancePool().
protected abstract  Example labelInstance(Instance query)
          Label an Instance chosen by the learner.
protected abstract  ExampleSchema schema()
          The set of classes that will be used.
 Classifier train(ClassifierLearner learner)
          Train a ClassifierLearner and return the learned Classifier, using some unspecified source of information to get labels.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassifierTeacher

public ClassifierTeacher()
Method Detail

train

public final Classifier train(ClassifierLearner learner)
Train a ClassifierLearner and return the learned Classifier, using some unspecified source of information to get labels.


schema

protected abstract ExampleSchema schema()
The set of classes that will be used.


examplePool

protected abstract java.util.Iterator<Example> examplePool()
Labeled instances that will be sent to the learner via a call to addExample().


instancePool

protected abstract java.util.Iterator<Instance> instancePool()
Unlabeled instances, which will be provided to the learner via setInstancePool(). These can be used for semi-supervised learner, or to form queries for active learning. .


labelInstance

protected abstract Example labelInstance(Instance query)
Label an Instance chosen by the learner. Return null if the query can't be answered, otherwise return a labeled version of the instance (an Example).


hasAnswers

protected abstract boolean hasAnswers()
Return true if this teacher can answer more queries.