mvpa2.clfs.transerror.ConfusionBasedError

Inheritance diagram of ConfusionBasedError

class mvpa2.clfs.transerror.ConfusionBasedError(clf, labels=None, confusion_state='training_stats', **kwargs)

For a given classifier report an error based on internally computed error measure (given by some ConfusionMatrix stored in some conditional attribute 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

Notes

Available conditional attributes:

  • confusion: None
  • training_stats: Proxy training_stats from underlying classifier.

(Conditional attributes enabled by default suffixed with +)

Methods

untrain() Untrain the *Error which relies on the classifier

Initialization.

Parameters:

clf : Classifier

Either trained or untrained classifier

confusion_state :

Id of the conditional attribute which stores ConfusionMatrix

labels : list

if provided, should be a set of labels to add on top of the ones present in testdata

train : bool

unless train=False, classifier gets trained if trainingdata provided to __call__

descr : str

Description of the instance

enable_ca : None or list of str

Names of the conditional attributes which should be enabled in addition to the default ones

disable_ca : None or list of str

Names of the conditional attributes which should be disabled

Methods

untrain() Untrain the *Error which relies on the classifier