diva.sketch.classification
Class Classification

java.lang.Object
  extended by diva.sketch.classification.Classification

public class Classification
extends Object

Data structure for storing a list of classifer type and confidence value pairs in the order of descending confidence values.

During classification, an example is compared to each classifier which in turn generates a value indicating how confident it thinks that the example belongs in the class. This value is called the confidence value. A classification contains a list of classifiers along with their corresponding confidence values for the example.

Version:
$Revision: 1.6 $
Author:
Heloise Hse (hwawen@eecs.berkeley.edu), Michael Shilman (michaels@eecs.berkeley.edu)

Constructor Summary
Classification(String[] types, double[] confidences)
          Construct a classification with no types.
 
Method Summary
 double getConfidence(int i)
          Return the i'th confidence.
 double getHighestConfidence()
           
 String getHighestConfidenceType()
           
 String getType(int i)
          Return the i'th type.
 int getTypeCount()
          Return the number of types in this classification.
 String toString()
          Return a string representation of this classification consisting of type and confidence pairs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Classification

public Classification(String[] types,
                      double[] confidences)
Construct a classification with no types.

Method Detail

getHighestConfidence

public double getHighestConfidence()

getHighestConfidenceType

public String getHighestConfidenceType()

getTypeCount

public int getTypeCount()
Return the number of types in this classification.


getType

public String getType(int i)
Return the i'th type.


getConfidence

public double getConfidence(int i)
Return the i'th confidence.


toString

public String toString()
Return a string representation of this classification consisting of type and confidence pairs.

Overrides:
toString in class Object


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.