opennlp.maxent
Interface Evalable


public interface Evalable

Interface for components which use maximum entropy models and can evaluate the performace of the models using the TrainEval class.


Method Summary
 EventCollector getEventCollector(java.io.Reader r)
          Returns the EventCollector that is used to collect all relevant information from the data file.
 java.lang.String getNegativeOutcome()
          The outcome that should be considered a negative result.
 void localEval(MaxentModel model, java.io.Reader r, Evalable e, boolean verbose)
          If the -l option is selected for evaluation, this method will be called rather than TrainEval's evaluation method.
 

Method Detail

getNegativeOutcome

java.lang.String getNegativeOutcome()
The outcome that should be considered a negative result. This is used for computing recall. In the case of binary decisions, this would be the false one.

Returns:
the events that this EventCollector has gathered

getEventCollector

EventCollector getEventCollector(java.io.Reader r)
Returns the EventCollector that is used to collect all relevant information from the data file. This is used for to test the predictions of the model. Note that if some of your features are the oucomes of previous events, this method will give you results assuming 100% performance on the previous events. If you don't like this, use the localEval method.

Parameters:
r - A reader containing the data for the event collector
Returns:
an EventCollector

localEval

void localEval(MaxentModel model,
               java.io.Reader r,
               Evalable e,
               boolean verbose)
If the -l option is selected for evaluation, this method will be called rather than TrainEval's evaluation method. This is good if your features includes the outcomes of previous events.

Parameters:
model - the maxent model to evaluate
r - Reader containing the data to process
e - The original Evalable. Probably not relevant.
verbose - a request to print more specific processing information


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.