weka.extraction
Class ExtractionEvaluation

java.lang.Object
  extended byweka.extraction.ExtractionEvaluation

public class ExtractionEvaluation
extends java.lang.Object

Class for evaluating extractors


Field Summary
protected  Instances m_testInstances
          Test instances
protected  Instances m_trainInstances
          Training instances
 
Constructor Summary
ExtractionEvaluation()
          A default constructor
 
Method Summary
protected  java.util.HashMap createDocFillerMap(Instances data)
          Given a set of data, create a HashMap which maps each Instance's uniqueID to a fillerPositionListMap.
 java.util.ArrayList evaluateModel(Extractor extractor, Instances testData)
          Evaluates an extractor on a given set of test instances
 java.lang.String globalInfo()
          Returns a string describing this evaluator
 void trainExtractor(Extractor extractor, Instances labeledData, Instances unlabeledData)
          Train an extractor on supplied data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_trainInstances

protected Instances m_trainInstances
Training instances


m_testInstances

protected Instances m_testInstances
Test instances

Constructor Detail

ExtractionEvaluation

public ExtractionEvaluation()
A default constructor

Method Detail

globalInfo

public java.lang.String globalInfo()
Returns a string describing this evaluator

Returns:
a description of the evaluator suitable for displaying in the explorer/experimenter gui

trainExtractor

public void trainExtractor(Extractor extractor,
                           Instances labeledData,
                           Instances unlabeledData)
                    throws java.lang.Exception
Train an extractor on supplied data

Parameters:
extractor - the extractor to train
labeledData - data that is labeled for training the extractor
unlabeledData - unlabeled data for transductive extractors
Throws:
java.lang.Exception

evaluateModel

public java.util.ArrayList evaluateModel(Extractor extractor,
                                         Instances testData)
                                  throws java.lang.Exception
Evaluates an extractor on a given set of test instances

Parameters:
extractor - the extractor to evaluate
testData - set of test instances for evaluation
Returns:
a list of arrays containing the basic statistics for each point
Throws:
java.lang.Exception - if model could not be evaluated successfully

createDocFillerMap

protected java.util.HashMap createDocFillerMap(Instances data)
Given a set of data, create a HashMap which maps each Instance's uniqueID to a fillerPositionListMap. In that map, every filler is mapped to a list of positions where it should extracted.