edu.cmu.minorthird.classify.sequential
Class GenericCollinsLearnerV1

java.lang.Object
  extended by 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

Nested Class Summary
static class GenericCollinsLearnerV1.MultiClassClassifier
           
 
Field Summary
 
Fields inherited from interface edu.cmu.minorthird.classify.sequential.SequenceConstants
HISTORY_FEATURE, NULL_CLASS_NAME
 
Constructor Summary
GenericCollinsLearnerV1()
           
GenericCollinsLearnerV1(int historySize, int epochs)
           
GenericCollinsLearnerV1(OnlineBinaryClassifierLearner innerLearner, int historySize)
           
GenericCollinsLearnerV1(OnlineBinaryClassifierLearner innerLearner, int historySize, int epochs)
           
 
Method Summary
 SequenceClassifier batchTrain(SequenceDataset dataset)
           
 int getHistorySize()
          Return the number of previous predictions used as features in learning.
 OnlineBinaryClassifierLearner getInnerLearner()
           
 int getNumberOfEpochs()
           
 void setHistorySize(int newHistorySize)
           
 void setInnerLearner(OnlineBinaryClassifierLearner newInnerLearner)
           
 void setNumberOfEpochs(int newNumberOfEpochs)
           
 void setSchema(ExampleSchema schema)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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