viper.comparison
Class TrackingEvaluation

java.lang.Object
  extended byviper.comparison.TrackingEvaluation
All Implemented Interfaces:
Evaluation

public class TrackingEvaluation
extends java.lang.Object
implements Evaluation

Evaluates keyed descriptor pairs, as described by Kasturi et. al. in their paper.


Nested Class Summary
static class TrackingEvaluation.TrackingMeasure
          A measure specifically designed for tracking, this allows multiple child measures.
 
Nested classes inherited from class viper.comparison.Evaluation
Evaluation.Information
 
Constructor Summary
TrackingEvaluation(EvaluationParameters epf)
          Constructs a new tracking evaluation from the given set of paremters.
 
Method Summary
 CompMatrix getMatrix()
          Gets the current map from candidate descriptors to targets.
 java.util.Map getMeasureMap()
          Return a map of DescPrototypes to their evaluations.
 java.lang.String getName()
          Gets the name of the evalutation type.
 java.io.PrintWriter getOutput()
          Gets the human readable output stream.
 java.io.PrintWriter getRaw()
          Gets the raw output stream.
 Revealer getTicker()
          Gets the current ticker UI object.
 int getTickerSize()
          Get an estimate on how long it will take to perform the evaluation.
 boolean isPrintingHeaders()
          Tests to see if the header and footer should be printed out.
 void parseEvaluation(VReader reader, DescriptorConfigs dcfgs)
          Parse the vreader section.
 Evaluation.Information printEvaluation()
          Print out the results of this evaluation.
 void printFooter(Evaluation.Information total)
          Prints the footer information, including overall scores.
 void printHeader()
          Prints the header information, usually about what metrics and rules were used in the evaluation.
 void printMetricsTo(java.io.PrintWriter output)
          Print out information about evaluation
 void printRawMetricsTo(java.io.PrintWriter raw)
          Print evaluation info in terse format
 void setMatrix(CompMatrix cm)
          Sets the matrix to evaluate.
 void setOutput(java.io.PrintWriter output)
          Sets where human-readable information should be printed.
 void setPrintingHeaders(boolean on)
          Set to print headers or not.
 void setRaw(java.io.PrintWriter raw)
          Sets the machine readable raw output stream.
 void setTicker(Revealer ticker)
          Sets the ui for progress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrackingEvaluation

public TrackingEvaluation(EvaluationParameters epf)
Constructs a new tracking evaluation from the given set of paremters.

Parameters:
epf - rules for the evaluation
Method Detail

printMetricsTo

public void printMetricsTo(java.io.PrintWriter output)
Description copied from interface: Evaluation
Print out information about evaluation

Specified by:
printMetricsTo in interface Evaluation
Parameters:
output - the output stream

printRawMetricsTo

public void printRawMetricsTo(java.io.PrintWriter raw)
Description copied from interface: Evaluation
Print evaluation info in terse format

Specified by:
printRawMetricsTo in interface Evaluation
Parameters:
raw - the raw stream

setOutput

public void setOutput(java.io.PrintWriter output)
Description copied from interface: Evaluation
Sets where human-readable information should be printed.

Specified by:
setOutput in interface Evaluation
Parameters:
output - the human readable output stream

getOutput

public java.io.PrintWriter getOutput()
Description copied from interface: Evaluation
Gets the human readable output stream.

Specified by:
getOutput in interface Evaluation
Returns:
the human readable output stream

setRaw

public void setRaw(java.io.PrintWriter raw)
Description copied from interface: Evaluation
Sets the machine readable raw output stream.

Specified by:
setRaw in interface Evaluation
Parameters:
raw - the machine readable stream

getRaw

public java.io.PrintWriter getRaw()
Gets the raw output stream.

Returns:
the raw output stream

setPrintingHeaders

public void setPrintingHeaders(boolean on)
Description copied from interface: Evaluation
Set to print headers or not.

Specified by:
setPrintingHeaders in interface Evaluation
Parameters:
on - true to print headers

isPrintingHeaders

public boolean isPrintingHeaders()
Description copied from interface: Evaluation
Tests to see if the header and footer should be printed out.

Specified by:
isPrintingHeaders in interface Evaluation
Returns:
if the header and footer should be printed

setTicker

public void setTicker(Revealer ticker)
Description copied from interface: Evaluation
Sets the ui for progress

Specified by:
setTicker in interface Evaluation
Parameters:
ticker - the progress ui

getTicker

public Revealer getTicker()
Gets the current ticker UI object.

Returns:
the ticker

setMatrix

public void setMatrix(CompMatrix cm)
Description copied from interface: Evaluation
Sets the matrix to evaluate.

Specified by:
setMatrix in interface Evaluation
Parameters:
cm - the matrix to evaluate

getMatrix

public CompMatrix getMatrix()
Gets the current map from candidate descriptors to targets.

Returns:
the comparison matrix

getTickerSize

public int getTickerSize()
Description copied from interface: Evaluation
Get an estimate on how long it will take to perform the evaluation. printEvaluation should call revealer.tick() exactly this many times.

Specified by:
getTickerSize in interface Evaluation
Returns:
the length of the ticker

printHeader

public void printHeader()
Description copied from interface: Evaluation
Prints the header information, usually about what metrics and rules were used in the evaluation.

Specified by:
printHeader in interface Evaluation

printFooter

public void printFooter(Evaluation.Information total)
Description copied from interface: Evaluation
Prints the footer information, including overall scores.

Specified by:
printFooter in interface Evaluation
Parameters:
total - the total

printEvaluation

public Evaluation.Information printEvaluation()
Description copied from interface: Evaluation
Print out the results of this evaluation. Since the evaluation operates on a CompMatrix level, the Evaluation.Information being passed back allows totals to be printed out at the end.

Specified by:
printEvaluation in interface Evaluation
Returns:
the evaluation information

parseEvaluation

public void parseEvaluation(VReader reader,
                            DescriptorConfigs dcfgs)
                     throws java.io.IOException
Description copied from interface: Evaluation
Parse the vreader section.

Specified by:
parseEvaluation in interface Evaluation
Parameters:
reader - VReader, already pointing at the begin evaluation directive.
dcfgs - the target data - the evaluation uses the target names
Throws:
java.io.IOException
See Also:
Evaluation.parseEvaluation(VReader, DescriptorConfigs)

getMeasureMap

public java.util.Map getMeasureMap()
Return a map of DescPrototypes to their evaluations.

Specified by:
getMeasureMap in interface Evaluation
Returns:
a map of DescPrototypes to their evaluations
See Also:
Evaluation.getMeasureMap()

getName

public java.lang.String getName()
Gets the name of the evalutation type.

Specified by:
getName in interface Evaluation
Returns:
Tracking Evaluation