org.itc.irst.tcc.sre.util
Class Evaluator

java.lang.Object
  extended by org.itc.irst.tcc.sre.util.Evaluator

public class Evaluator
extends java.lang.Object

TO DO

Since:
1.0
Version:
%I%, %G%
Author:
Claudio Giuliano

Field Summary
private  double acc
           
private  int correct
           
(package private)  java.text.DecimalFormat decFormatter
           
private  double f1
           
private  double fn
           
private  double fp
           
(package private) static org.apache.log4j.Logger logger
          Define a static logger variable so that it references the Logger instance named Evaluator.
private  double prec
           
private  double recall
           
private  double tn
           
private  int total
           
private  double tp
           
 
Constructor Summary
Evaluator(java.io.File refFile, java.io.File predFile)
          Creates a Evaluator object.
Evaluator(java.util.List ref, java.util.List pred)
          Creates a Evaluator object.
 
Method Summary
protected  void eval(java.util.List ref, java.util.List pred)
           
 double getAccuracy()
           
 int getCorrect()
           
 double getF1()
           
 int getFN()
           
 int getFP()
           
 double getPrecision()
           
 double getRecall()
           
 int getTotal()
           
 int getTP()
           
static void main(java.lang.String[] args)
           
protected  java.util.List read(java.io.File f)
           
protected  java.util.List readRef(java.io.File f)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

static org.apache.log4j.Logger logger
Define a static logger variable so that it references the Logger instance named Evaluator.


tp

private double tp

fp

private double fp

fn

private double fn

tn

private double tn

prec

private double prec

recall

private double recall

f1

private double f1

acc

private double acc

total

private int total

correct

private int correct

decFormatter

java.text.DecimalFormat decFormatter
Constructor Detail

Evaluator

public Evaluator(java.io.File refFile,
                 java.io.File predFile)
          throws java.io.IOException,
                 java.lang.IndexOutOfBoundsException
Creates a Evaluator object.

Throws:
java.io.IOException
java.lang.IndexOutOfBoundsException

Evaluator

public Evaluator(java.util.List ref,
                 java.util.List pred)
          throws java.lang.IndexOutOfBoundsException
Creates a Evaluator object.

Throws:
java.lang.IndexOutOfBoundsException
Method Detail

getTP

public int getTP()

getFP

public int getFP()

getFN

public int getFN()

getPrecision

public double getPrecision()

getRecall

public double getRecall()

getF1

public double getF1()

getAccuracy

public double getAccuracy()

getTotal

public int getTotal()

getCorrect

public int getCorrect()

readRef

protected java.util.List readRef(java.io.File f)
                          throws java.io.IOException
Throws:
java.io.IOException

read

protected java.util.List read(java.io.File f)
                       throws java.io.IOException
Throws:
java.io.IOException

eval

protected void eval(java.util.List ref,
                    java.util.List pred)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception