Class ReVerbClassifierTrainer

java.lang.Object
  extended by ReVerbClassifierTrainer

public class ReVerbClassifierTrainer
extends java.lang.Object

Used to train the ReVerb confidence function using the features described by ReVerbFeatures. Given a set of LabeledBinaryExtraction instances, this class featurizes them and trains a logistic regression classifier using Weka's Logistic class. This class can be called from the command-line to train a classifier and save the resulting model to a file.

Author:
afader

Constructor Summary
ReVerbClassifierTrainer(java.lang.Iterable<edu.washington.cs.knowitall.extractor.conf.LabeledBinaryExtraction> examples, weka.classifiers.Classifier classifier)
          Constructs and trains a new Logistic classifier using the given examples.
 
Method Summary
 weka.classifiers.Classifier getClassifier()
           
 edu.washington.cs.knowitall.extractor.conf.WekaDataSet<edu.washington.cs.knowitall.nlp.extraction.ChunkedBinaryExtraction> getDataSet()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReVerbClassifierTrainer

public ReVerbClassifierTrainer(java.lang.Iterable<edu.washington.cs.knowitall.extractor.conf.LabeledBinaryExtraction> examples,
                               weka.classifiers.Classifier classifier)
                        throws java.lang.Exception
Constructs and trains a new Logistic classifier using the given examples.

Parameters:
examples -
Throws:
java.lang.Exception
Method Detail

getDataSet

public edu.washington.cs.knowitall.extractor.conf.WekaDataSet<edu.washington.cs.knowitall.nlp.extraction.ChunkedBinaryExtraction> getDataSet()
Returns:
the data set used to train the classifier

getClassifier

public weka.classifiers.Classifier getClassifier()
Returns:
the trained classifier.