edu.cmu.minorthird.classify.sequential
Class StackedSequenceLearner

java.lang.Object
  extended by edu.cmu.minorthird.classify.sequential.StackedSequenceLearner
All Implemented Interfaces:
BatchSequenceClassifierLearner, SequenceClassifierLearner

public class StackedSequenceLearner
extends java.lang.Object
implements BatchSequenceClassifierLearner

Author:
William Cohen

Nested Class Summary
static class StackedSequenceLearner.StackingParams
          Bundle of parameters for the StackedSequenceLearner.
 
Constructor Summary
StackedSequenceLearner()
           
StackedSequenceLearner(ClassifierLearner baseLearner, int depth)
           
StackedSequenceLearner(ClassifierLearner baseLearner, int depth, int windowSize)
           
StackedSequenceLearner(SequenceClassifierLearner baseLearner, int depth)
           
StackedSequenceLearner(SequenceClassifierLearner baseLearner, int depth, int windowSize)
           
 
Method Summary
 SequenceClassifier batchTrain(SequenceDataset dataset)
           
 int getHistorySize()
          Number of instances before the current target for which the predicted class will be used as a feature.
 StackedSequenceLearner.StackingParams getParams()
           
 void setHistorySize(int newHistorySize)
           
 void setSchema(ExampleSchema schema)
           
 SequenceDataset stackDataset(SequenceDataset dataset)
          Create a new dataset in which each instance has been augmented with the history features constructed from the *predicted* labels of previous examples, where the prediction is made using cross-validation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackedSequenceLearner

public StackedSequenceLearner()

StackedSequenceLearner

public StackedSequenceLearner(SequenceClassifierLearner baseLearner,
                              int depth)

StackedSequenceLearner

public StackedSequenceLearner(ClassifierLearner baseLearner,
                              int depth)

StackedSequenceLearner

public StackedSequenceLearner(SequenceClassifierLearner baseLearner,
                              int depth,
                              int windowSize)

StackedSequenceLearner

public StackedSequenceLearner(ClassifierLearner baseLearner,
                              int depth,
                              int windowSize)
Method Detail

getHistorySize

public int getHistorySize()
Number of instances before the current target for which the predicted class will be used as a feature.

Specified by:
getHistorySize in interface SequenceClassifierLearner

setHistorySize

public void setHistorySize(int newHistorySize)

getParams

public StackedSequenceLearner.StackingParams getParams()

setSchema

public void setSchema(ExampleSchema schema)
Specified by:
setSchema in interface SequenceClassifierLearner

batchTrain

public SequenceClassifier batchTrain(SequenceDataset dataset)
Specified by:
batchTrain in interface BatchSequenceClassifierLearner

stackDataset

public SequenceDataset stackDataset(SequenceDataset dataset)
Create a new dataset in which each instance has been augmented with the history features constructed from the *predicted* labels of previous examples, where the prediction is made using cross-validation.