LBJ2.learn
Class Accuracy

java.lang.Object
  extended by LBJ2.learn.Accuracy
All Implemented Interfaces:
TestingMetric

public class Accuracy
extends java.lang.Object
implements TestingMetric

This is the cross validation testing metric which LBJ defaults to when none is specified. It simply counts the number of correct predictions and returns that number divided by the total number of examples which it used for testing.


Constructor Summary
Accuracy()
          Standard constructor, takes no arguments and does nothing.
 
Method Summary
 double test(Classifier classifier, Classifier oracle, Parser parser)
          The test method is what LBJ calls during its testing stage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Accuracy

public Accuracy()
Standard constructor, takes no arguments and does nothing.

Method Detail

test

public double test(Classifier classifier,
                   Classifier oracle,
                   Parser parser)
The test method is what LBJ calls during its testing stage.

Specified by:
test in interface TestingMetric
Parameters:
classifier - The classifier whose accuracy is being measured.
oracle - A classifier that returns the label of each example.
parser - A parser to supply the example objects.