edu.cmu.minorthird.classify
Class StackedLearner

java.lang.Object
  extended by edu.cmu.minorthird.classify.BatchClassifierLearner
      extended by edu.cmu.minorthird.classify.StackedLearner
All Implemented Interfaces:
ClassifierLearner, java.lang.Cloneable

public class StackedLearner
extends BatchClassifierLearner

Stacked generalization. This implementation is based on Wolpert, D.H. (1992), Stacked Generalization, Neural Networks, Vol. 5, pp. 241-259, Pergamon Press. http://citeseer.nj.nec.com/wolpert92stacked.html

Author:
William Cohen

Field Summary
 
Fields inherited from class edu.cmu.minorthird.classify.BatchClassifierLearner
classifier, dataset
 
Constructor Summary
StackedLearner()
          Use stacked learning to calibrate the predictions of AdaBoost using logistic regression, using 3-CV to split.
StackedLearner(BatchClassifierLearner innerLearner)
          Use stacked learning to calibrate the predictions of the inner learner using logistic regression, using 3-CV to split.
StackedLearner(BatchClassifierLearner[] innerLearners, BatchClassifierLearner finalLearner, Splitter<Example> splitter)
          Create a stacked learner.
StackedLearner(BatchClassifierLearner innerLearner, Splitter<Example> splitter)
          Use stacked learning to calibrate the predictions of the inner learner using logistic regression.
 
Method Summary
 Classifier batchTrain(Dataset dataset)
          subclasses should use this method to implement a batch supervised learning algorithm.
 BatchClassifierLearner getInnerLearner()
           
 ExampleSchema getSchema()
          Returns the ExampleSchema - constraints on what the Examples will be.
 Splitter<Example> getSplitter()
           
 void setInnerLearner(BatchClassifierLearner learner)
           
 void setSchema(ExampleSchema schema)
          Accept an ExampleSchema - constraints on what the Examples will be.
 void setSplitter(Splitter<Example> splitter)
           
 
Methods inherited from class edu.cmu.minorthird.classify.BatchClassifierLearner
addExample, completeTraining, copy, getClassifier, hasNextQuery, nextQuery, reset, setInstancePool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackedLearner

public StackedLearner(BatchClassifierLearner innerLearner,
                      Splitter<Example> splitter)
Use stacked learning to calibrate the predictions of the inner learner using logistic regression.


StackedLearner

public StackedLearner(BatchClassifierLearner innerLearner)
Use stacked learning to calibrate the predictions of the inner learner using logistic regression, using 3-CV to split.


StackedLearner

public StackedLearner()
Use stacked learning to calibrate the predictions of AdaBoost using logistic regression, using 3-CV to split.


StackedLearner

public StackedLearner(BatchClassifierLearner[] innerLearners,
                      BatchClassifierLearner finalLearner,
                      Splitter<Example> splitter)
Create a stacked learner.

Method Detail

getSplitter

public Splitter<Example> getSplitter()

setSplitter

public void setSplitter(Splitter<Example> splitter)

setInnerLearner

public void setInnerLearner(BatchClassifierLearner learner)

getInnerLearner

public BatchClassifierLearner getInnerLearner()

setSchema

public final void setSchema(ExampleSchema schema)
Description copied from interface: ClassifierLearner
Accept an ExampleSchema - constraints on what the Examples will be.


getSchema

public final ExampleSchema getSchema()
Description copied from interface: ClassifierLearner
Returns the ExampleSchema - constraints on what the Examples will be.


batchTrain

public Classifier batchTrain(Dataset dataset)
Description copied from class: BatchClassifierLearner
subclasses should use this method to implement a batch supervised learning algorithm.

Specified by:
batchTrain in class BatchClassifierLearner