edu.cmu.minorthird.classify.sequential
Class CollinsPerceptronLearner
java.lang.Object
edu.cmu.minorthird.classify.sequential.CollinsPerceptronLearner
- All Implemented Interfaces:
- BatchSequenceClassifierLearner, SequenceClassifierLearner, SequenceConstants
- Direct Known Subclasses:
- MarginPerceptronLearner, Recommended.VPTagLearner
public class CollinsPerceptronLearner
- extends java.lang.Object
- implements BatchSequenceClassifierLearner, SequenceConstants
Sequential learner based on the perceptron algorithm, as described
in Discriminative Training Methods for Hidden Markov Models: Theory
and Experiments with Perceptron Algorithms, Mike Collins, EMNLP
2002.
- Author:
- William Cohen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static org.apache.log4j.Logger log
DEBUG
protected static final boolean DEBUG
historySize
protected int historySize
numberOfEpochs
protected int numberOfEpochs
history
protected java.lang.String[] history
CollinsPerceptronLearner
public CollinsPerceptronLearner()
CollinsPerceptronLearner
public CollinsPerceptronLearner(int numberOfEpochs)
CollinsPerceptronLearner
public CollinsPerceptronLearner(int historySize,
int numberOfEpochs)
getNumberOfEpochs
public int getNumberOfEpochs()
setNumberOfEpochs
public void setNumberOfEpochs(int newNumberOfEpochs)
getHistorySize
public int getHistorySize()
- Description copied from interface:
SequenceClassifierLearner
- Return the number of previous predictions used as features in
learning.
- Specified by:
getHistorySize
in interface SequenceClassifierLearner
setHistorySize
public void setHistorySize(int newHistorySize)
getHistorySizeHelp
public java.lang.String getHistorySizeHelp()
setSchema
public void setSchema(ExampleSchema schema)
- Specified by:
setSchema
in interface SequenceClassifierLearner
batchTrain
public SequenceClassifier batchTrain(SequenceDataset dataset)
- Specified by:
batchTrain
in interface BatchSequenceClassifierLearner