Alignment API and Server 4.1.${version.update}

fr.inrialpes.exmo.align.impl.eval
Class GraphEvaluator

java.lang.Object
  extended by fr.inrialpes.exmo.align.impl.eval.GraphEvaluator
Direct Known Subclasses:
AveragePRGraphEvaluator, PRGraphEvaluator, ROCCurveEvaluator, ThresholdGraphEvaluator

public abstract class GraphEvaluator
extends Object

GraphEvaluator: an abstraction that is used for providing evaluation curves instead of values (or sets of values) Pair: only used for recording sets of points in a curve GraphEvaluator is used (generically) in the following way: - create a GraphEvaluator (new GraphEvaluator) - fill it with the set of results that you want to evaluate (.ingest( Alignment, Alignment) and this repetively - Finally create plot (.eval() ) This abstract class provides the ingest method but not eval which has to be implemented in subclasses. ingest can be rewritten as well.

Version:
$Id: GraphEvaluator.java 1506 2010-08-21 08:45:52Z euzenat $
Author:
Jerome Euzenat

Field Summary
protected  SortedSet<EvalCell> cellSet
           
 boolean invalid
           
protected  int nbexpected
           
 Vector<Pair> points
           
protected  int STEP
          The resolution of the provided result: by STEP steps
 
Constructor Summary
GraphEvaluator()
          Creation: A priori, evaluators can deal with any kind of alignments.
GraphEvaluator(boolean ascending)
           
 
Method Summary
abstract  Vector<Pair> eval()
          Returns the points to display in a graph
abstract  Vector<Pair> eval(Properties params)
          Returns the points to display in a graph
abstract  double getGlobalResult()
          Retuns a simple global evaluation measure if any
 int getStep()
           
 void ingest(Alignment al, Alignment ref)
           
protected  void initCellSet(boolean ascending)
           
 boolean isCorrect(Cell c, Alignment ref)
           
 boolean isValid()
           
 int nbCells()
           
 void setStep(int i)
           
 void writePlot(PrintWriter writer)
           
 void writeXMLMap(PrintWriter writer)
          This output the resulting plot in XML
abstract  String xlabel()
           
abstract  String ylabel()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STEP

protected int STEP
The resolution of the provided result: by STEP steps


nbexpected

protected int nbexpected

cellSet

protected SortedSet<EvalCell> cellSet

points

public Vector<Pair> points

invalid

public boolean invalid
Constructor Detail

GraphEvaluator

public GraphEvaluator()
Creation: A priori, evaluators can deal with any kind of alignments. However, it will not work if these are not of the same type.


GraphEvaluator

public GraphEvaluator(boolean ascending)
Method Detail

eval

public abstract Vector<Pair> eval()
                           throws AlignmentException
Returns the points to display in a graph

Throws:
AlignmentException

eval

public abstract Vector<Pair> eval(Properties params)
                           throws AlignmentException
Returns the points to display in a graph

Throws:
AlignmentException

getGlobalResult

public abstract double getGlobalResult()
Retuns a simple global evaluation measure if any


setStep

public void setStep(int i)

getStep

public int getStep()

initCellSet

protected void initCellSet(boolean ascending)

ingest

public void ingest(Alignment al,
                   Alignment ref)

isValid

public boolean isValid()

nbCells

public int nbCells()

isCorrect

public boolean isCorrect(Cell c,
                         Alignment ref)

writeXMLMap

public void writeXMLMap(PrintWriter writer)
                 throws IOException
This output the resulting plot in XML

Throws:
IOException

writePlot

public void writePlot(PrintWriter writer)

xlabel

public abstract String xlabel()

ylabel

public abstract String ylabel()

Alignment API and Server 4.1.${version.update}

(C) INRIA & friends, 2003-${curryear}