|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.classify.semisupervised.SemiSupervisedBatchClassifierLearner
public abstract class SemiSupervisedBatchClassifierLearner
Abstract ClassifierLearner which instantiates the teacher-learner protocol so as to implement a standard batch learner.
Field Summary | |
---|---|
protected Classifier |
classifier
This variable saves the last classifier produced by batchTrain. |
Constructor Summary | |
---|---|
SemiSupervisedBatchClassifierLearner()
|
Method Summary | |
---|---|
void |
addExample(Example answeredQuery)
Accept a labeled example. |
abstract Classifier |
batchTrain(SemiSupervisedDataset dataset)
subclasses should use this method to implement a batch supervised learning algorithm. |
void |
completeTraining()
Accept a signal that no more training data is available. |
Classifier |
getClassifier()
Return the learned classifier. |
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. |
abstract void |
setInstancePool(java.util.Iterator<Instance> i)
subclasses should use this method to get the unlabeled examples available for semi-supervised learning. |
abstract void |
setSchema(ExampleSchema schema)
Enables control on number of classes allowed to be passed to the learner |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.cmu.minorthird.classify.ClassifierLearner |
---|
copy, getSchema |
Field Detail |
---|
protected Classifier classifier
Constructor Detail |
---|
public SemiSupervisedBatchClassifierLearner()
Method Detail |
---|
public final void reset()
ClassifierLearner
reset
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 final void addExample(Example answeredQuery)
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 final Classifier getClassifier()
ClassifierLearner
All learners must implement this method.
getClassifier
in interface ClassifierLearner
public abstract void setSchema(ExampleSchema schema)
setSchema
in interface ClassifierLearner
public abstract void setInstancePool(java.util.Iterator<Instance> i)
setInstancePool
in interface ClassifierLearner
public abstract Classifier batchTrain(SemiSupervisedDataset dataset)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |