Package mvpa :: Package featsel :: Module base :: Class SensitivityBasedFeatureSelection
[hide private]
[frames] | no frames]

Class SensitivityBasedFeatureSelection

source code


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.

Nested Classes [hide private]

Inherited from misc.state.ClassWithCollections: __metaclass__

Instance Methods [hide private]
 
__init__(self, sensitivity_analyzer, feature_selector=FractionTailSelector(0.05), **kwargs)
Initialize feature selection
source code
 
untrain(self)
'Untrain' feature selection
source code
 
__call__(self, dataset, testdataset=None)
Select the most important features
source code

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

Inherited from object: __delattr__, __format__, __hash__, __reduce__, __reduce_ex__, __sizeof__, __subclasshook__

Class Variables [hide private]
  sensitivity = StateVariable(enabled= False)
  sensitivity_analyzer = property(fget= lambda self: self.__sens...

Inherited from FeatureSelection: selected_ids

Inherited from misc.state.ClassWithCollections: _DEV__doc__, descr

Instance Variables [hide private]
  __sensitivity_analyzer
Sensitivity analyzer to use once
  __feature_selector
Functor which takes care about removing some features.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, sensitivity_analyzer, feature_selector=FractionTailSelector(0.05), **kwargs)
(Constructor)

source code 
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.
Overrides: object.__init__

untrain(self)

source code 

'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

Overrides: FeatureSelection.untrain
(inherited documentation)

__call__(self, dataset, testdataset=None)
(Call operator)

source code 

Select the most important features

Returns a tuple of two new datasets with selected feature subset of dataset.

Parameters:
  • dataset (Dataset) - used to compute sensitivity maps
  • testdataset, Dataset - optional dataset to select features on
Overrides: FeatureSelection.__call__

Class Variable Details [hide private]

sensitivity_analyzer

Value:
property(fget= lambda self: self.__sensitivity_analyzer, doc= "Measure\
 which was used to do selection")