edu.cmu.minorthird.classify.sequential
Class MarginPerceptronLearner

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

public class MarginPerceptronLearner
extends CollinsPerceptronLearner

Sequential learner based on the perceptron algorithm that takes the top-k viterbi paths and subtracts those within a margin of beta of the correct.

Author:
Sunita Sarawagi

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.cmu.minorthird.classify.sequential.CollinsPerceptronLearner
CollinsPerceptronLearner.MultiClassVPClassifier
 
Field Summary
 
Fields inherited from class edu.cmu.minorthird.classify.sequential.CollinsPerceptronLearner
DEBUG, history, historySize, log, numberOfEpochs
 
Fields inherited from interface edu.cmu.minorthird.classify.sequential.SequenceConstants
HISTORY_FEATURE, NULL_CLASS_NAME
 
Constructor Summary
MarginPerceptronLearner()
           
MarginPerceptronLearner(int numberOfEpochs)
           
MarginPerceptronLearner(int historySize, int numberOfEpochs, float beta)
           
MarginPerceptronLearner(int historySize, int numberOfEpochs, float beta, int topK)
           
 
Method Summary
 SequenceClassifier batchTrain(SequenceDataset dataset)
           
 
Methods inherited from class edu.cmu.minorthird.classify.sequential.CollinsPerceptronLearner
getHistorySize, getHistorySizeHelp, getNumberOfEpochs, setHistorySize, setNumberOfEpochs, setSchema
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarginPerceptronLearner

public MarginPerceptronLearner()

MarginPerceptronLearner

public MarginPerceptronLearner(int numberOfEpochs)

MarginPerceptronLearner

public MarginPerceptronLearner(int historySize,
                               int numberOfEpochs,
                               float beta)

MarginPerceptronLearner

public MarginPerceptronLearner(int historySize,
                               int numberOfEpochs,
                               float beta,
                               int topK)
Method Detail

batchTrain

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