Table Of Contents

Previous topic

mvpa.featsel.ifs

Next topic

mvpa.algorithms

This Page

Quick search

mvpa.featsel.rfe

Recursive feature elimination.

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

RFE

class mvpa.featsel.rfe.RFE(sensitivity_analyzer, transfer_error, feature_selector=FractionTailSelector() fraction=0.050000, bestdetector=<mvpa.featsel.helpers.BestDetector object at 0x8e8fa0c>, stopping_criterion=<mvpa.featsel.helpers.NBackHistoryStopCrit object at 0x8e8f9ec>, train_clf=None, update_sensitivity=True, **kargs)

Bases: mvpa.featsel.base.FeatureSelection

Recursive feature elimination.

A FeaturewiseDatasetMeasure is used to compute sensitivity maps given a certain dataset. These sensitivity maps are in turn used to discard unimportant features. For each feature selection the transfer error on some testdatset is computed. This procedure is repeated until a given StoppingCriterion is reached.

Such strategy after
Guyon, I., Weston, J., Barnhill, S., & Vapnik, V. (2002). Gene selection for cancer classification using support vector machines. Mach. Learn., 46(1-3), 389–422.
was applied to SVM-based analysis of fMRI data in
Hanson, S. J. & Halchenko, Y. O. (2008). Brain reading using full brain support vector machines for object recognition: there is no “face identification area”. Neural Computation, 20, 486–503.

Initialize recursive feature elimination

Parameters:
  • sensitivity_analyzer (FeaturewiseDatasetMeasure object) –
  • transfer_error (TransferError object) – used to compute the transfer error of a classifier based on a certain feature set on the test dataset. NOTE: If sensitivity analyzer is based on the same classifier as transfer_error is using, make sure you initialize transfer_error with train=False, otherwise it would train classifier twice without any necessity.
  • feature_selector (Functor) – Given a sensitivity map it has to return the ids of those features that should be kept.
  • bestdetector (Functor) – Given a list of error values it has to return a boolean that signals whether the latest error value is the total minimum.
  • stopping_criterion (Functor) – Given a list of error values it has to return whether the criterion is fulfilled.
  • train_clf (bool) – Flag whether the classifier in transfer_error should be trained before computing the error. In general this is required, but if the sensitivity_analyzer and transfer_error share and make use of the same classifier it can be switched off to save CPU cycles. Default None checks if sensitivity_analyzer is based on a classifier and doesn’t train if so.
  • update_sensitivity (bool) – If False the sensitivity map is only computed once and reused for each iteration. Otherwise the senstitivities are recomputed at each selection step.

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 RFE documentation.

Full API documentation of RFE in module mvpa.featsel.rfe.