edu.cmu.minorthird.classify
Class DatasetClassifierTeacher

java.lang.Object
  extended by edu.cmu.minorthird.classify.ClassifierTeacher
      extended by edu.cmu.minorthird.classify.DatasetClassifierTeacher

public class DatasetClassifierTeacher
extends ClassifierTeacher

Trains a ClassifierLearner using the information in a labeled Dataset.

Author:
William Cohen

Constructor Summary
DatasetClassifierTeacher(Dataset dataset)
           
DatasetClassifierTeacher(Dataset dataset, boolean activeLearning)
           
 
Method Summary
 java.util.Iterator<Example> examplePool()
          Labeled instances that will be sent to the learner via a call to addExample().
 boolean hasAnswers()
          Return true if this teacher can answer more queries.
 java.util.Iterator<Instance> instancePool()
          Unlabeled instances, which will be provided to the learner via setInstancePool().
 Example labelInstance(Instance query)
          Label an Instance chosen by the learner.
static void main(java.lang.String[] argv)
           
 ExampleSchema schema()
          The set of classes that will be used.
 
Methods inherited from class edu.cmu.minorthird.classify.ClassifierTeacher
train
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatasetClassifierTeacher

public DatasetClassifierTeacher(Dataset dataset)

DatasetClassifierTeacher

public DatasetClassifierTeacher(Dataset dataset,
                                boolean activeLearning)
Parameters:
activeLearning - if true, all learning is active - ie nothing is pushed at the learner, everything must be 'pulled' via queries. if false, all examples fron the dataset are 'pushed' at the learner via addExample.
Method Detail

schema

public ExampleSchema schema()
Description copied from class: ClassifierTeacher
The set of classes that will be used.

Specified by:
schema in class ClassifierTeacher

examplePool

public java.util.Iterator<Example> examplePool()
Description copied from class: ClassifierTeacher
Labeled instances that will be sent to the learner via a call to addExample().

Specified by:
examplePool in class ClassifierTeacher

instancePool

public java.util.Iterator<Instance> instancePool()
Description copied from class: ClassifierTeacher
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. .

Specified by:
instancePool in class ClassifierTeacher

labelInstance

public Example labelInstance(Instance query)
Description copied from class: ClassifierTeacher
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).

Specified by:
labelInstance in class ClassifierTeacher

hasAnswers

public boolean hasAnswers()
Description copied from class: ClassifierTeacher
Return true if this teacher can answer more queries.

Specified by:
hasAnswers in class ClassifierTeacher

main

public static void main(java.lang.String[] argv)