Package mvpa :: Package measures :: Module base :: Class FeaturewiseDatasetMeasure

[hide private]
[frames] | no frames]

# Class FeaturewiseDatasetMeasure

source code

A per-feature-measure computed from a Dataset (base class).

Should behave like a DatasetMeasure.

Nested Classes | [hide private]

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

Instance Methods | [hide private]

__init__(self, combiner=SecondAxisSumOfAbs, **kwargs) Initialize | source code

__repr__(self, prefixes=None) String representation of DatasetMeasure | source code

_call(self, dataset) Computes a per-feature-measure on a given Dataset. | source code

_postcall(self, dataset, result) Adjusts per-feature-measure for computed `result` | source code

combiner(self) Return combiner | source code

Inherited from `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]

| base_sensitivities = `StateVariable(enabled= False, doc= "Store`...``
Inherited from `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, combiner=SecondAxisSumOfAbs, **kwargs)
(Constructor)

source code

Initialize

Parameters:
  - `combiner` (Functor) - 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__

### __repr__(self, prefixes=None)
(Representation operator)

source code

String representation of DatasetMeasure

Includes only arguments which differ from default ones

Parameters:
  - `fullname` - Either to include full name of the module
  - `prefixes` - What other prefixes to prepend to list of arguments
Overrides: object.__repr__
  (inherited documentation)

### _call(self, dataset)

source code

Computes a per-feature-measure on a given Dataset.

Behaves like a DatasetMeasure, but computes and returns a 1d ndarray with one value per feature.

Overrides: DatasetMeasure._call

### _postcall(self, dataset, result)

source code

    Adjusts per-feature-measure for computed `result`

    TODO: overlaps in what it does heavily with
     CombinedSensitivityAnalyzer, thus this one might make use of
     CombinedSensitivityAnalyzer yoh thinks, and here
     base_sensitivities doesn't sound appropriate.
     MH: There is indeed some overlap, but also significant differences.
         This one operates on a single sensana and combines over second
         axis, CombinedFeaturewiseDatasetMeasure uses first axis.
         Additionally, 'Sensitivity' base class is
         FeaturewiseDatasetMeasures which would have to be changed to
         CombinedFeaturewiseDatasetMeasure to deal with stuff like
         SMLRWeights that return multiple sensitivity values by default.
         Not sure if unification of both (and/or removal of functionality
         here does not lead to an overall more complicated situation,
         without any real gain -- after all this one works ;-)

Overrides: DatasetMeasure._postcall

### combiner(self)

source code

Return combiner

Decorators:
  - `@property`

Class Variable Details | [hide private]

### base_sensitivities

Value:

      StateVariable(enabled= False, doc= "Stores basic sensitivities if the
      sensitivity "+ "relies on combining multiple ones")