viper.comparison
Class CompEvaluator

java.lang.Object
  extended byviper.comparison.CompEvaluator

public class CompEvaluator
extends java.lang.Object

A collection of Descriptor Objects that supports various operations on them, such as comparison between two DescVectors, collection of statistics, reading and printing from files, and various others.

Version:
%I%, %G%
Author:
Felix Sukhenko, David Mihalcik, David Doermann

Constructor Summary
CompEvaluator(DescriptorData targets, DescriptorData candidates, double statThreshold, int matchType, EvaluationParameters.ScopeRules epf, java.io.PrintWriter log)
          Creates a new evaluator, which compares several files and descriptor types, making it somewhat more general than a CompMatrix.
 
Method Summary
 void printCandidates(java.io.PrintWriter output, java.io.PrintWriter raw, DescriptorConfigs targetConfigs)
          Print the current surviving candidate information to the given raw and human-readable outputs.
 void printCurrentFM(java.io.PrintWriter output, java.io.PrintWriter raw, DescriptorConfigs targetConfigs)
          Print the current false/missed information to the given raw and human-readable outputs.
 Evaluation.Information printEvaluationResults(Evaluation eva)
          Runs an evaluation using the given Evaluation object on all of the comparison matrices, summing the results, and returning the sum.
 java.lang.String printMatchTables()
          Print the table of matches.
 void printPR(java.io.PrintWriter output, java.io.PrintWriter raw, DescriptorConfigs targetConfigs)
          Print out precision and recall information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompEvaluator

public CompEvaluator(DescriptorData targets,
                     DescriptorData candidates,
                     double statThreshold,
                     int matchType,
                     EvaluationParameters.ScopeRules epf,
                     java.io.PrintWriter log)
Creates a new evaluator, which compares several files and descriptor types, making it somewhat more general than a CompMatrix.

Parameters:
targets - the target data set
candidates - the candidate data set
statThreshold - the statistic threshold
matchType - the type of frame range matching to use
epf - the metric and rule information
log - the error log
Method Detail

printMatchTables

public java.lang.String printMatchTables()
Print the table of matches. This is the overall match table, if any matches exist.

Returns:
the formatted match distances

printCurrentFM

public void printCurrentFM(java.io.PrintWriter output,
                           java.io.PrintWriter raw,
                           DescriptorConfigs targetConfigs)
Print the current false/missed information to the given raw and human-readable outputs.

Parameters:
output - the human-readable output
raw - the raw formatted output
targetConfigs - the target descriptors to print out

printCandidates

public void printCandidates(java.io.PrintWriter output,
                            java.io.PrintWriter raw,
                            DescriptorConfigs targetConfigs)
Print the current surviving candidate information to the given raw and human-readable outputs.

Parameters:
output - the human-readable output
raw - the raw formatted output
targetConfigs - the target descriptors to print out

printEvaluationResults

public Evaluation.Information printEvaluationResults(Evaluation eva)
Runs an evaluation using the given Evaluation object on all of the comparison matrices, summing the results, and returning the sum. Note that the return value may be null if there were no matches, or if that is what the Evaluation returns from its printEvaluation method.

Parameters:
eva - The evaluation to run.
Returns:
The sum of the results (each added with Evaluation.Information.add()).

printPR

public void printPR(java.io.PrintWriter output,
                    java.io.PrintWriter raw,
                    DescriptorConfigs targetConfigs)
Print out precision and recall information.

Parameters:
output - the human-readable output
raw - the raw formatted output
targetConfigs - the target descriptors to print out