annotool.classify
Interface Classifier

All Known Subinterfaces:
SavableClassifier

public interface Classifier

Classifier returns a prediction based on training and testing image sets.

See Also:
SavableClassifier

Method Summary
 void classify(float[][] trainingpatterns, int[] trainingtargets, float[][] testingpatterns, int[] predictions, double[] prob)
          Classifies the patterns using the input parameters.
 boolean doesSupportProbability()
          Returns whether or not the algorithm uses probability estimations.
 void setParameters(java.util.HashMap<java.lang.String,java.lang.String> para)
          Sets algorithm parameters from para
 

Method Detail

setParameters

void setParameters(java.util.HashMap<java.lang.String,java.lang.String> para)
Sets algorithm parameters from para

Parameters:
para - Each element of para holds a parameter name for its key and a its value is that of the parameter. The parameters should be the same as those in the algorithms.xml file.

classify

void classify(float[][] trainingpatterns,
              int[] trainingtargets,
              float[][] testingpatterns,
              int[] predictions,
              double[] prob)
              throws java.lang.Exception
Classifies the patterns using the input parameters.

Parameters:
trainingpatterns - Pattern data to train the algorithm
trainingtargets - Targets for the training pattern
testingpatterns - Pattern data to be classified
predictions - Storage for the resulting prediction
prob - Storage for probability result
Throws:
java.lang.Exception - Optional, generic exception to be thrown

doesSupportProbability

boolean doesSupportProbability()
Returns whether or not the algorithm uses probability estimations.

Returns:
True if the algorithm uses probability estimations, False if not