Package PyML :: Package evaluators :: Module assess :: Class ClassificationResultsContainer
[frames] | no frames]

Class ClassificationResultsContainer

source code

             object --+    
                      |    
       ResultsContainer --+
                          |
             object --+   |
                      |   |
ClassificationFunctions --+
                          |
                         ClassificationResultsContainer

A class for holding the results of testing a classifier
Instance Methods
 
plotROC(res, fileName=None, **args)
plot the ROC curve from a given Results (or Results-like) object
source code
 
__init__(self, arg, classifier=None, **args)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
copyConstruct(self, other, **args) source code
 
__getattr__(self, attr) source code
 
getROC(self, rocN=None) source code
 
appendPrediction(self, arg, data, pattern)
add the classification results and labels of a data point
source code
 
computeStats(self, **args) source code
 
convert(self, *options) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

    Inherited from ResultsContainer
 
__len__(self) source code
    Inherited from ClassificationFunctions
 
__repr__(self)
repr(x)
source code
 
formatConfusionMatrix(self) source code
 
successRates(self) source code
Class Variables
  shortAttrList = ['info', 'log', 'successRate', 'balancedSucces...
  longAttrList = ['info', 'log', 'Y', 'L', 'decisionFunc', 'give...
Properties

Inherited from object: __class__

Method Details

plotROC(res, fileName=None, **args)

source code 
plot the ROC curve from a given Results (or Results-like) object
Parameters:
  • res - Results (or Container object that was made by saving a a Results object (note that if you have a Results object you can use this function as a method so there is no need to supply this argument).
  • fileName - optional argument - if given, the roc curve is saved in the given file name. The format is determined by the extension. Supported extensions: .eps, .png, .svg
  • rocN - what type of ROC curve to plot (roc50, roc10 etc.) default is full ROC curve
  • normalize - whether to normalize the ROC curve (default: True)
  • plotStr - which string to pass to matplotlib's plot function default: 'ob'
  • axis - redefine the figure axes; takes a list of the form [xmin,xmax,ymin,ymax]
  • show - whether to show the ROC curve (default: True) useful when you just want to save the curve to a file. The use of Some file formats automatically sets this to False (e.g. svg files). This relates to quirks of matplotlib.

__init__(self, arg, classifier=None, **args)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

appendPrediction(self, arg, data, pattern)

source code 
add the classification results and labels of a data point
Overrides: ResultsContainer.appendPrediction

Class Variable Details

shortAttrList

Value:
['info', 'log', 'successRate', 'balancedSuccessRate', 'roc', 'roc50', \
'classLabels', 'confusionMatrix', 'ppv', 'sensitivity']

longAttrList

Value:
['info', 'log', 'Y', 'L', 'decisionFunc', 'givenY', 'givenL', 'classLa\
bels', 'patternID', 'numClasses']