Package mvpa :: Package measures :: Module noiseperturbation :: Class NoisePerturbationSensitivity

[hide private]
[frames] | no frames]

# Class NoisePerturbationSensitivity

source code

This is a FeaturewiseDatasetMeasure that uses a scalar DatasetMeasure and selective noise perturbation to compute a sensitivity map.

First the scalar DatasetMeasure computed using the original dataset. Next the data measure is computed multiple times each with a single feature in the dataset perturbed by noise. The resulting difference in the scalar DatasetMeasure is used as the sensitivity for the respective perturbed feature. Large differences are treated as an indicator of a feature having great impact on the scalar DatasetMeasure.

The computed sensitivity map might have positive and negative values!

Nested Classes | [hide private]

Inherited from `misc.state.ClassWithCollections`: `__metaclass__`

Instance Methods | [hide private]

__init__(self, datameasure, noise=N.random.normal) Cheap initialization. | source code

_call(self, dataset) Compute the sensitivity map. | source code

Inherited from `base.FeaturewiseDatasetMeasure`: `__repr__`, `combiner`

Inherited from `base.FeaturewiseDatasetMeasure` (private): `_postcall`

Inherited from `base.DatasetMeasure`: `__call__`, `null_dist`, `transformer`, `untrain`

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

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

Class Variables | [hide private]

Inherited from `base.FeaturewiseDatasetMeasure`: `base_sensitivities` Inherited from `base.DatasetMeasure`: `__doc__`, `null_prob`, `null_t`, `raw_results` Inherited from `misc.state.ClassWithCollections`: `_DEV__doc__`, `descr`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, datameasure, noise=N.random.normal)
(Constructor)

source code

Cheap initialization.

Parameters:
  - `combiner` - The combiner is only applied if the computed featurewise dataset measure is more than one-dimensional. This is different from a transformer, which is always applied. By default, the sum of absolute values along the second axis is computed.
Overrides: object.__init__

Parameters:

datameasure: `Datameasure` that is used to quantify the effect of
  noise perturbation.
noise: Functor to generate noise. The noise generator has to return
  an 1d array of n values when called the `size=n` keyword argument. This is the default interface of the random number generators in NumPy's random module.

### _call(self, dataset)

source code

Compute the sensitivity map.

Returns a 1d array of sensitivities for all features in `dataset`.

Overrides: base.DatasetMeasure._call