edu.cmu.minorthird.classify.sequential
Class StackedSequenceLearner
java.lang.Object
edu.cmu.minorthird.classify.sequential.StackedSequenceLearner
- All Implemented Interfaces:
- BatchSequenceClassifierLearner, SequenceClassifierLearner
public class StackedSequenceLearner
- extends java.lang.Object
- implements BatchSequenceClassifierLearner
- Author:
- William Cohen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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)
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.