Package pyvision :: Package analysis :: Package classifier :: Module ConfusionMatrix :: Class ConfusionMatrix
[hide private]
[frames] | no frames]

Class ConfusionMatrix

source code

Table.Table --+
              |
             ConfusionMatrix

Instance Methods [hide private]
 
__init__(self, algorithm_name=None, test_name=None) source code
 
addData(self, truth, prediction, weight=1)
Add data to a confusion matrix.
source code
 
update_rate(self)
Returns a point estimate of the probability of success
source code
 
confidenceInterval(self, alpha=0.05)
Returns the estimated a confidence interval for the success update_rate by modeling the success update_rate as a binomial distribution.
source code
 
computeRates(self, alpha=0.05)
Populates the distance matrix with more information such as recognition rates for each row.
source code

Inherited from Table.Table: __getitem__, __setitem__, __str__, accumulateData, asHtml, asLists, asPlainText, asTex, element, elementAsText, hasElement, head, justifyText, load, nCols, nRows, rebuildTable, save, setColumnFormat, setData, setElement, sortByColHeader, sortByRowHeader, tail

Method Details [hide private]

__init__(self, algorithm_name=None, test_name=None)
(Constructor)

source code 
Overrides: Table.Table.__init__

addData(self, truth, prediction, weight=1)

source code 

Add data to a confusion matrix. "truth" is the true/correct and "prediction" is the output of the classifier. Typically you would build this matrix one "test" at a time. To add multiple test at a time you can use the weight to populate the data more quickly.

computeRates(self, alpha=0.05)

source code 

Populates the distance matrix with more information such as recognition rates for each row. Call this only after all of the data has been added.