Package mvpa :: Package clfs :: Module transerror :: Class ConfusionBasedError
[hide private]
[frames] | no frames]

Class ConfusionBasedError

source code


For a given classifier report an error based on internally computed error measure (given by some ConfusionMatrix stored in some state variable of Classifier).

This way we can perform feature selection taking as the error criterion either learning error, or transfer to splits error in the case of SplitClassifier

Nested Classes [hide private]

Inherited from misc.state.ClassWithCollections: __metaclass__

Instance Methods [hide private]
 
__init__(self, clf, labels=None, confusion_state="training_confusion", **kwargs)
Initialization.
source code
 
_call(self, testdata, trainingdata=None)
Extract transfer error. Nor testdata, neither trainingdata is used
source code

Inherited from ClassifierError: __call__, __copy__, clf, labels, untrain

Inherited from ClassifierError (private): _postcall, _precall

Inherited from misc.state.ClassWithCollections: __getattribute__, __new__, __repr__, __setattr__, __str__, reset

Inherited from object: __delattr__, __format__, __hash__, __reduce__, __reduce_ex__, __sizeof__, __subclasshook__

Class Variables [hide private]
  __doc__ = enhancedDocString('ConfusionBasedError', locals(), C...

Inherited from ClassifierError: confusion, training_confusion

Inherited from misc.state.ClassWithCollections: _DEV__doc__, descr

Instance Variables [hide private]
  __confusion_state
What state to extract from

Inherited from ClassifierError (private): _labels

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, clf, labels=None, confusion_state="training_confusion", **kwargs)
(Constructor)

source code 
Initialization.
Parameters:
  • clf (Classifier) - Either trained or untrained classifier
  • confusion_state - Id of the state variable which stores ConfusionMatrix
  • labels (list) - if provided, should be a set of labels to add on top of the ones present in testdata
Overrides: object.__init__

_call(self, testdata, trainingdata=None)

source code 
Extract transfer error. Nor testdata, neither trainingdata is used
Overrides: ClassifierError._call

Class Variable Details [hide private]

__doc__

Value:
enhancedDocString('ConfusionBasedError', locals(), ClassifierError)