viper.comparison
Class FramewiseEvaluation

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

public class FramewiseEvaluation
extends java.lang.Object
implements Evaluation

A framewise evaluation views each frame individually, computing aggregate statisitcs on a frame-by-frame or even pixel-by-pixel level, disregarding the continuity of descriptors. This is great for computing things like pixel and frame counts.


Nested Class Summary
static class FramewiseEvaluation.FrameMeasure
          A measure for a given frame.
 
Nested classes inherited from class viper.comparison.Evaluation
Evaluation.Information
 
Constructor Summary
FramewiseEvaluation(EvaluationParameters epf)
          Constructs a new framewise evaluation from the given parameters
 
Method Summary
 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.
 int getTickerSize()
          Gets the number of elements in the ticker.
 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()
          Prints out the evaluation information after a successful 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 out)
          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

FramewiseEvaluation

public FramewiseEvaluation(EvaluationParameters epf)
Constructs a new framewise evaluation from the given parameters

Parameters:
epf - the evaluation parameters
Method Detail

printMetricsTo

public void printMetricsTo(java.io.PrintWriter out)
Print out information about evaluation

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

printRawMetricsTo

public void printRawMetricsTo(java.io.PrintWriter raw)
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)
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()
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)
Sets the machine readable raw output stream.

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

setPrintingHeaders

public void setPrintingHeaders(boolean on)
Set to print headers or not.

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

isPrintingHeaders

public boolean isPrintingHeaders()
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)
Sets the ui for progress

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

setMatrix

public void setMatrix(CompMatrix cm)
Sets the matrix to evaluate.

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

getTickerSize

public int getTickerSize()
Gets the number of elements in the ticker.

Specified by:
getTickerSize in interface Evaluation
Returns:
the maximum size of the ticker.

printHeader

public void printHeader()
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)
Prints the footer information, including overall scores.

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

printEvaluation

public Evaluation.Information printEvaluation()
Prints out the evaluation information after a successful evaluation.

Specified by:
printEvaluation in interface Evaluation
Returns:
the sum over all of the frames.

parseEvaluation

public void parseEvaluation(VReader reader,
                            DescriptorConfigs dcfgs)
                     throws java.io.IOException
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

getMeasureMap

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

Specified by:
getMeasureMap in interface Evaluation
Returns:
a map of DescPrototypes to their evaluations

getName

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

Specified by:
getName in interface Evaluation
Returns:
"Framewise Evaluation"