edu.cmu.minorthird.classify.sequential
Class GenericCollinsLearnerV1
java.lang.Object
edu.cmu.minorthird.classify.sequential.GenericCollinsLearnerV1
- All Implemented Interfaces:
- BatchSequenceClassifierLearner, SequenceClassifierLearner, SequenceConstants
public class GenericCollinsLearnerV1
- extends java.lang.Object
- implements BatchSequenceClassifierLearner, SequenceConstants
Generic version of Collin's voted perceptron learner.
- Author:
- William Cohen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericCollinsLearnerV1
public GenericCollinsLearnerV1()
GenericCollinsLearnerV1
public GenericCollinsLearnerV1(OnlineBinaryClassifierLearner innerLearner,
int historySize)
GenericCollinsLearnerV1
public GenericCollinsLearnerV1(int historySize,
int epochs)
GenericCollinsLearnerV1
public GenericCollinsLearnerV1(OnlineBinaryClassifierLearner innerLearner,
int historySize,
int epochs)
setSchema
public void setSchema(ExampleSchema schema)
- Specified by:
setSchema
in interface SequenceClassifierLearner
getInnerLearner
public OnlineBinaryClassifierLearner getInnerLearner()
setInnerLearner
public void setInnerLearner(OnlineBinaryClassifierLearner newInnerLearner)
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)
getNumberOfEpochs
public int getNumberOfEpochs()
setNumberOfEpochs
public void setNumberOfEpochs(int newNumberOfEpochs)
batchTrain
public SequenceClassifier batchTrain(SequenceDataset dataset)
- Specified by:
batchTrain
in interface BatchSequenceClassifierLearner