Table Of Contents

Previous topic

mvpa.algorithms

Next topic

mvpa.base

This Page

Quick search

mvpa.algorithms.cvtranserror

Cross-validate a classifier on a dataset

The comprehensive API documentation for this module, including all technical details, is available in the Epydoc-generated API reference for mvpa.algorithms.cvtranserror (for developers).

CrossValidatedTransferError

class mvpa.algorithms.cvtranserror.CrossValidatedTransferError(transerror, splitter=<mvpa.datasets.splitter.NoneSplitter object at 0x8b564cc>, combiner=<function GrandMean at 0x8d1bf0c>, expose_testdataset=False, harvest_attribs=None, copy_attribs='copy', **kwargs)

Bases: mvpa.measures.base.DatasetMeasure, mvpa.misc.state.Harvestable

Cross validate a classifier on datasets generated by a splitter from a source dataset.

Arbitrary performance/error values can be computed by specifying an error function (used to compute an error value for each cross-validation fold) and a combiner function that aggregates all computed error values across cross-validation folds.

Cheap initialization.

Parameters:
  • transerror (TransferError instance) – Provides the classifier used for cross-validation.
  • splitter (Splitter instance) – Used to split the dataset for cross-validation folds. By convention the first dataset in the tuple returned by the splitter is used to train the provided classifier. If the first element is ‘None’ no training is performed. The second dataset is used to generate predictions with the (trained) classifier.
  • combiner (Functor) – Used to aggregate the error values of all cross-validation folds.
  • expose_testdataset (bool) – In the proper pipeline, classifier must not know anything about testing data, but in some cases it might lead only to marginal harm, thus migth wanted to be enabled (provide testdataset for RFE to determine stopping point).
  • harvest_attribs (list of basestr) – What attributes of call to store and return within harvested state variable
  • copy_attribs (None or basestr) – Force copying values of attributes on harvesting
combiner
splitter
transerror

See also

Derived classes might provide additional methods via their base classes. Please refer to the list of base classes (if it exists) at the begining of the CrossValidatedTransferError documentation.

Full API documentation of CrossValidatedTransferError in module mvpa.algorithms.cvtranserror.