gov.sandia.cognition.learning.performance.categorization
Class DefaultBinaryConfusionMatrixConfidenceInterval

java.lang.Object
  extended by gov.sandia.cognition.learning.performance.categorization.DefaultBinaryConfusionMatrixConfidenceInterval

public class DefaultBinaryConfusionMatrixConfidenceInterval
extends Object

Puts Student-t ConfidenceIntervals on each entry of the ConfusionMatrix

Since:
2.0
Author:
Kevin R. Dixon

Nested Class Summary
static class DefaultBinaryConfusionMatrixConfidenceInterval.Summary
          An implementation of the Summarizer interface for creating a ConfusionMatrixInterval
 
Constructor Summary
DefaultBinaryConfusionMatrixConfidenceInterval(double confidence, ConfidenceInterval falsePositivesRate, ConfidenceInterval falseNegativesRate, ConfidenceInterval truePositivesRate, ConfidenceInterval trueNegativesRate)
          Creates a new instance of ConfusionMatrixConfidenceInterval
 
Method Summary
protected static void checkConfidence(double confidence)
          Checks to make sure that confidence is between 0.0 and 1.0.
static DefaultBinaryConfusionMatrixConfidenceInterval compute(Collection<? extends DefaultBinaryConfusionMatrix> data, double confidence)
          Computes the ConfidenceIntervals for the given Collection of ConfusionMatrices
 double getConfidence()
          Getter for confidence
 ConfidenceInterval getFalseNegativesRate()
          Getter for falseNegativesRate
 ConfidenceInterval getFalsePositivesRate()
          Getter for falsePositivesRate
 ConfidenceInterval getTrueNegativesRate()
          Getter for trueNegativesRate
 ConfidenceInterval getTruePositivesRate()
          Getter for truePositivesRate
protected  void setConfidence(double confidence)
          Setter for confidence
protected  void setFalseNegativesRate(ConfidenceInterval falseNegativesRate)
          Setter for falseNegativesRate
protected  void setFalsePositivesRate(ConfidenceInterval falsePositivesRate)
          Setter for falsePositivesRate
protected  void setTrueNegativesRate(ConfidenceInterval trueNegativesRate)
          Setter for trueNegativesRate
protected  void setTruePositivesRate(ConfidenceInterval truePositivesRate)
          Setter for truePositivesRate
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultBinaryConfusionMatrixConfidenceInterval

public DefaultBinaryConfusionMatrixConfidenceInterval(double confidence,
                                                      ConfidenceInterval falsePositivesRate,
                                                      ConfidenceInterval falseNegativesRate,
                                                      ConfidenceInterval truePositivesRate,
                                                      ConfidenceInterval trueNegativesRate)
Creates a new instance of ConfusionMatrixConfidenceInterval

Parameters:
confidence - Confidence that the statistic is within the bound, or 1-alpha, on the interval [0,1], where confidence=0 means definitely not within the bound and confidence=1 means definitely within the bound.
falsePositivesRate - The fraction of target falses incorrectly classified as true, FalsePositives / TotalNegatives = 1 - TrueNegativesRate
falseNegativesRate - The fraction of target falses incorrectly classified as false, FalseNegatives / TotalPositives = 1 - TruePositivesRate
truePositivesRate - The fraction of target trues that were correctly classified as true, TruePositives / TotalPositives = TruePositives / (TruePositives + FalseNegatives)
trueNegativesRate - The fraction of negative targets correctly classified as false, TrueNegatives / TotalNegatives = TrueNegatives / (TrueNegatives + FalsePositives)
Method Detail

getFalsePositivesRate

public ConfidenceInterval getFalsePositivesRate()
Getter for falsePositivesRate

Returns:
The fraction of target falses incorrectly classified as true, FalsePositives / TotalNegatives = 1 - TrueNegativesRate

setFalsePositivesRate

protected void setFalsePositivesRate(ConfidenceInterval falsePositivesRate)
Setter for falsePositivesRate

Parameters:
falsePositivesRate - The fraction of target falses incorrectly classified as true, FalsePositives / TotalNegatives = 1 - TrueNegativesRate

getFalseNegativesRate

public ConfidenceInterval getFalseNegativesRate()
Getter for falseNegativesRate

Returns:
The fraction of target falses incorrectly classified as false, FalseNegatives / TotalPositives = 1 - TruePositivesRate

setFalseNegativesRate

protected void setFalseNegativesRate(ConfidenceInterval falseNegativesRate)
Setter for falseNegativesRate

Parameters:
falseNegativesRate - The fraction of target falses incorrectly classified as false, FalseNegatives / TotalPositives = 1 - TruePositivesRate

getTruePositivesRate

public ConfidenceInterval getTruePositivesRate()
Getter for truePositivesRate

Returns:
The fraction of target trues that were correctly classified as true, TruePositives / TotalPositives = TruePositives / (TruePositives + FalseNegatives)

setTruePositivesRate

protected void setTruePositivesRate(ConfidenceInterval truePositivesRate)
Setter for truePositivesRate

Parameters:
truePositivesRate - The fraction of target trues that were correctly classified as true, TruePositives / TotalPositives = TruePositives / (TruePositives + FalseNegatives)

getTrueNegativesRate

public ConfidenceInterval getTrueNegativesRate()
Getter for trueNegativesRate

Returns:
The fraction of negative targets correctly classified as false, TrueNegatives / TotalNegatives = TrueNegatives / (TrueNegatives + FalsePositives)

setTrueNegativesRate

protected void setTrueNegativesRate(ConfidenceInterval trueNegativesRate)
Setter for trueNegativesRate

Parameters:
trueNegativesRate - The fraction of negative targets correctly classified as false, TrueNegatives / TotalNegatives = TrueNegatives / (TrueNegatives + FalsePositives)

getConfidence

public double getConfidence()
Getter for confidence

Returns:
Confidence that the statistic is within the bound, or 1-alpha, on the interval [0,1], where confidence=0 means definitely not within the bound and confidence=1 means definitely within the bound.

setConfidence

protected void setConfidence(double confidence)
Setter for confidence

Parameters:
confidence - Confidence that the statistic is within the bound, or 1-alpha, on the interval [0,1], where confidence=0 means definitely not within the bound and confidence=1 means definitely within the bound.

checkConfidence

protected static void checkConfidence(double confidence)
Checks to make sure that confidence is between 0.0 and 1.0.

Parameters:
confidence - The confidence.

toString

public String toString()
Overrides:
toString in class Object

compute

public static DefaultBinaryConfusionMatrixConfidenceInterval compute(Collection<? extends DefaultBinaryConfusionMatrix> data,
                                                                     double confidence)
Computes the ConfidenceIntervals for the given Collection of ConfusionMatrices

Parameters:
data - Collection of ConfusionMatrices from which to compute the ConfidenceIntervals
confidence - Confidence that the statistic is within the bound, or 1-alpha, on the interval [0,1], where confidence=0 means definitely not within the bound and confidence=1 means definitely within the bound.
Returns:
ConfusionMatrixConfidenceInterval that captures the ConfidenceIntervals of the correct/incorrect classification rates