|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.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 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 final void addExample(Example answeredQuery)
ClassifierLearnerAll learners must provide a non-trivial implementation of addExample.
addExample in interface ClassifierLearnerpublic final void completeTraining()
ClassifierLearner
completeTraining in interface ClassifierLearnerpublic final Classifier getClassifier()
ClassifierLearnerAll learners must implement this method.
getClassifier in interface ClassifierLearnerpublic abstract void setSchema(ExampleSchema schema)
setSchema in interface ClassifierLearnerpublic abstract void setInstancePool(java.util.Iterator<Instance> i)
setInstancePool in interface ClassifierLearnerpublic abstract Classifier batchTrain(SemiSupervisedDataset dataset)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||