|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.cmu.minorthird.classify.relational.StackedBatchClassifierLearner
public abstract class StackedBatchClassifierLearner
Abstract ClassifierLearner which instantiates the teacher-learner protocol so as to implement a stacked batch learner.
Field Summary | |
---|---|
protected Classifier |
classifier
|
protected RealRelationalDataset |
dataset
This variable saves the last classifier produced by batchTrain. |
Constructor Summary | |
---|---|
StackedBatchClassifierLearner()
|
Method Summary | |
---|---|
void |
addExample(Example answeredQuery)
Accept a labeled example. |
abstract Classifier |
batchTrain(RealRelationalDataset RelDataset)
subclasses should use this method to implement a batch supervised learning algorithm. |
void |
completeTraining()
Accept a signal that no more training data is available. |
ClassifierLearner |
copy()
Make a copy of the learner. |
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. |
void |
setInstancePool(java.util.Iterator<Instance> i)
Accept a set of unlabeled instances. |
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 |
---|
getSchema, setSchema |
Field Detail |
---|
protected RealRelationalDataset dataset
protected Classifier classifier
Constructor Detail |
---|
public StackedBatchClassifierLearner()
Method Detail |
---|
public final void reset()
ClassifierLearner
reset
in interface ClassifierLearner
public final void setInstancePool(java.util.Iterator<Instance> i)
ClassifierLearner
Learners need not make use of the instance pool.
setInstancePool
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 ClassifierLearner copy()
ClassifierLearner
copy
in interface ClassifierLearner
public abstract Classifier batchTrain(RealRelationalDataset RelDataset)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |