Table Of Contents

Previous topic

measures.splitmeasure

Next topic

featsel.helpers

This content refers to the previous stable release of PyMVPA. Please visit www.pymvpa.org for the most recent version of PyMVPA and its documentation.

featsel.base

Module: featsel.base

Inheritance diagram for mvpa.featsel.base:

Feature selection base class and related stuff base classes and helpers.

Classes

CombinedFeatureSelection

class mvpa.featsel.base.CombinedFeatureSelection(feature_selections, combiner, **kwargs)

Bases: mvpa.featsel.base.FeatureSelection

Meta feature selection utilizing several embedded selection methods.

Each embedded feature selection method is computed individually. Afterwards all feature sets are combined by either taking the union or intersection of all sets.

The individual feature sets of all embedded methods are optionally avialable from the selections_ids state variable.

Note

Available state variables:

  • selected_ids: State variable
  • selections_ids+: List of feature id sets for each performed method.

(States enabled by default are listed with +)

See also

Please refer to the documentation of the base class for more information:

FeatureSelection

Parameters:
  • feature_selections (list) – FeatureSelection instances to run. Order is not important.
  • combiner (‘union’, ‘intersection’) – which method to be used to combine the feature selection set of all computed methods.
  • enable_states (None or list of basestring) – Names of the state variables which should be enabled additionally to default ones
  • disable_states (None or list of basestring) – Names of the state variables which should be disabled
combiner

Selection set combination method.

feature_selections

List of FeatureSelections

untrain()

FeatureSelection

class mvpa.featsel.base.FeatureSelection(**kwargs)

Bases: mvpa.misc.state.ClassWithCollections

Base class for any feature selection

Base class for Functors which implement feature selection on the datasets.

Note

Available state variables:

  • selected_ids: State variable

(States enabled by default are listed with +)

See also

Please refer to the documentation of the base class for more information:

ClassWithCollections

Initialize instance of FeatureSelection

Parameters:
  • enable_states (None or list of basestring) – Names of the state variables which should be enabled additionally to default ones
  • disable_states (None or list of basestring) – Names of the state variables which should be disabled
untrain()

‘Untrain’ feature selection

Necessary for full ‘untraining’ of the classifiers. By default does nothing, needs to be overridden in corresponding feature selections to pass to the sensitivities

FeatureSelectionPipeline

class mvpa.featsel.base.FeatureSelectionPipeline(feature_selections, **kwargs)

Bases: mvpa.featsel.base.FeatureSelection

Feature elimination through the list of FeatureSelection’s.

Given as list of FeatureSelections it applies them in turn.

Note

Available state variables:

  • nfeatures+: Number of features before each step in pipeline
  • selected_ids: State variable

(States enabled by default are listed with +)

See also

Please refer to the documentation of the base class for more information:

FeatureSelection

Initialize feature selection pipeline

Parameters:
  • feature_selections (lisf of FeatureSelection) – selections which to use. Order matters
  • enable_states (None or list of basestring) – Names of the state variables which should be enabled additionally to default ones
  • disable_states (None or list of basestring) – Names of the state variables which should be disabled
feature_selections

List of FeatureSelections

untrain()

SensitivityBasedFeatureSelection

class mvpa.featsel.base.SensitivityBasedFeatureSelection(sensitivity_analyzer, feature_selector=FractionTailSelector() fraction=0.050000, **kwargs)

Bases: mvpa.featsel.base.FeatureSelection

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.

Note

Available state variables:

  • selected_ids: State variable
  • sensitivity: State variable

(States enabled by default are listed with +)

See also

Please refer to the documentation of the base class for more information:

FeatureSelection

Initialize feature selection

Parameters:
  • sensitivity_analyzer (FeaturewiseDatasetMeasure) – sensitivity analyzer to come up with sensitivity
  • feature_selector (Functor) – Given a sensitivity map it has to return the ids of those features that should be kept.
  • enable_states (None or list of basestring) – Names of the state variables which should be enabled additionally to default ones
  • disable_states (None or list of basestring) – Names of the state variables which should be disabled
sensitivity_analyzer

Measure which was used to do selection

untrain()