com.wcohen.ss.expt
Class BasicTeacher

java.lang.Object
  extended by com.wcohen.ss.api.StringDistanceTeacher
      extended by com.wcohen.ss.expt.BasicTeacher

public class BasicTeacher
extends StringDistanceTeacher

Train a StringDistanceLearner.


Constructor Summary
BasicTeacher(Blocker blocker, MatchData data)
          Create a teacher from a blocker and a dataset.
BasicTeacher(StringWrapperIterator wrapperIterator, DistanceInstanceIterator distanceInstancePool, DistanceInstanceIterator distanceExamplePool)
          Create a teacher using specific values for the various iterators.
 
Method Summary
 DistanceInstanceIterator distanceExamplePool()
          A pool of unlabeled pairs of strings over which distances will be computed, to be used for supervised learning.
 DistanceInstanceIterator distanceInstancePool()
          A pool of unlabeled pairs of strings over which distances will be computed, to be used for active or semi-supervised learning.
 boolean hasAnswers()
          Return true if this teacher can answer more queries.
 DistanceInstance labelInstance(DistanceInstance distanceInstance)
          Label an instance queried by the learner.
 StringWrapperIterator stringWrapperIterator()
          Strings over which distances will be computed.
 
Methods inherited from class com.wcohen.ss.api.StringDistanceTeacher
train
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicTeacher

public BasicTeacher(Blocker blocker,
                    MatchData data)
Create a teacher from a blocker and a dataset. Will train from all blocked pairs.


BasicTeacher

public BasicTeacher(StringWrapperIterator wrapperIterator,
                    DistanceInstanceIterator distanceInstancePool,
                    DistanceInstanceIterator distanceExamplePool)
Create a teacher using specific values for the various iterators.

Method Detail

stringWrapperIterator

public StringWrapperIterator stringWrapperIterator()
Description copied from class: StringDistanceTeacher
Strings over which distances will be computed.

Specified by:
stringWrapperIterator in class StringDistanceTeacher

distanceInstancePool

public DistanceInstanceIterator distanceInstancePool()
Description copied from class: StringDistanceTeacher
A pool of unlabeled pairs of strings over which distances will be computed, to be used for active or semi-supervised learning.

Specified by:
distanceInstancePool in class StringDistanceTeacher

distanceExamplePool

public DistanceInstanceIterator distanceExamplePool()
Description copied from class: StringDistanceTeacher
A pool of unlabeled pairs of strings over which distances will be computed, to be used for supervised learning.

Specified by:
distanceExamplePool in class StringDistanceTeacher

labelInstance

public DistanceInstance labelInstance(DistanceInstance distanceInstance)
Description copied from class: StringDistanceTeacher
Label an instance queried by the learner. Return null if the query can't be answered.

Specified by:
labelInstance in class StringDistanceTeacher

hasAnswers

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

Specified by:
hasAnswers in class StringDistanceTeacher