Facemorph.mdl
Interface SpecificityTest<T>

Type Parameters:
T - type of specificity test (usually an image of template type)
All Known Implementing Classes:
SpecificityCombinedTest, SpecificityCombinedTestFile, SpecificityImageTest, SpecificityTemplateTest

public interface SpecificityTest<T>

Generic specificity testing interface


Method Summary
 double calculateError(T t1, T t2)
          Calculates the error between two Ts
 double[] calculateSpecificity(int comps, int trials)
          Calculates the specitivity of the model
 double findMinError(T testT)
          Find the minimum error from the set of Ts
 T makeRandom(int comps)
          Makes a random T from the model
 

Method Detail

makeRandom

T makeRandom(int comps)
Makes a random T from the model

Parameters:
comps - the number of model components to use
Returns:
returns the generated Template

calculateError

double calculateError(T t1,
                      T t2)
Calculates the error between two Ts

Parameters:
t1 - first T
t2 - second T
Returns:
returns the error

findMinError

double findMinError(T testT)
                    throws java.io.IOException
Find the minimum error from the set of Ts

Parameters:
testT - the test template
Returns:
returns the error from the most similar in the training set
Throws:
java.io.IOException - may be thrown if data is read

calculateSpecificity

double[] calculateSpecificity(int comps,
                              int trials)
                              throws java.io.IOException
Calculates the specitivity of the model

Parameters:
comps - the number of model components to use
trials - the number of trials to performs
Returns:
returns the mean and sd of the error in an array {meanErr, sdErr}
Throws:
java.io.IOException - may be thrown if data is read