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

Class TransferError

source code


Compute the transfer error of a (trained) classifier on a dataset.

The actual error value is computed using a customizable error function. Optionally the classifier can be trained by passing an additional training dataset to the __call__() method.

Nested Classes [hide private]

Inherited from misc.state.Stateful: __metaclass__

Instance Methods [hide private]
 
__init__(self, clf, errorfx=MeanMismatchErrorFx(), labels=None, null_dist=None, **kwargs)
Initialization.
source code
 
__copy__(self)
TODO: think...
source code
 
_call(self, testdataset, trainingdataset=None)
Compute the transfer error for a certain test dataset.
source code
 
_postcall(self, vdata, wdata=None, error=None) source code
 
errorfx(self) source code

Inherited from ClassifierError: __call__, clf, labels

Inherited from ClassifierError (private): _precall

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

Inherited from object: __delattr__, __hash__, __new__, __reduce__, __reduce_ex__

Class Variables [hide private]
  null_prob = StateVariable(enabled= True)
Stores the probability of an error result under the NULL hypothesis
  __doc__ = enhancedDocString('TransferError', locals(), Classif...

Inherited from ClassifierError: confusion, training_confusion

Instance Variables [hide private]

Inherited from ClassifierError (private): _labels

Properties [hide private]

Inherited from misc.state.Stateful: descr

Inherited from object: __class__

Method Details [hide private]

__init__(self, clf, errorfx=MeanMismatchErrorFx(), labels=None, null_dist=None, **kwargs)
(Constructor)

source code 
Initialization.
Parameters:
  • clf - Either trained or untrained classifier
  • labels - if provided, should be a set of labels to add on top of the ones present in testdata
  • train - unless train=False, classifier gets trained if trainingdata provided to __call__
Overrides: object.__init__

Parameters:

clf : Classifier
Either trained or untrained classifier
errorfx
Functor that computes a scalar error value from the vectors of desired and predicted values (e.g. subclass of ErrorFunction)
labels : list
if provided, should be a set of labels to add on top of the ones present in testdata

null_dist : instance of distribution estimator

__copy__(self)

source code 
TODO: think... may be we need to copy self.clf
Overrides: ClassifierError.__copy__

_call(self, testdataset, trainingdataset=None)

source code 

Compute the transfer error for a certain test dataset.

If trainingdataset is not None the classifier is trained using the provided dataset before computing the transfer error. Otherwise the classifier is used in it's current state to make the predictions on the test dataset.

Returns a scalar value of the transfer error.

Overrides: ClassifierError._call

_postcall(self, vdata, wdata=None, error=None)

source code 
Overrides: ClassifierError._postcall

errorfx(self)

source code 
Decorators:
  • @property

Class Variable Details [hide private]

__doc__

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