| Multivariate Pattern Analysis in Python

### Navigation

- index
- next |
- previous |
- ExpPsy Project |
- NeuroDebian Project |
- PyMVPA 0.4.x Home |
- PyMVPA Home |
- Documentation »
- Module Reference »

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.

# misc.transformers

## Module: `misc.transformers`

Inheritance diagram for `mvpa.misc.transformers`:

Simply functors that transform something.

## Classes

### `DistPValue`

class `mvpa.misc.transformers.``DistPValue`(sd=0, distribution='rdist', fpp=None, nbins=400, **kwargs)

  Bases: `mvpa.misc.state.ClassWithCollections`

  Converts values into p-values under vague and non-scientific assumptions

  Note

  Available state variables:

  - nulldist_number+: Number of features within the estimated null-distribution
  - positives_recovered+: Number of features considered to be positives and which were recovered

  (States enabled by default are listed with +)

  See also

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

  `ClassWithCollections`

  L2-Norm the values, convert them to p-values of a given distribution.

  Parameters:

  - sd (int) – Samples dimension (if len(x.shape)>1) on which to operate
  - distribution (string) – Which distribution to use. Known are: ‘rdist’ (later normal should be there as well)
  - fpp (float) – At what p-value (both tails) if not None, to control for false positives. It would iteratively prune the tails (tentative real positives) until empirical p-value becomes less or equal to numerical.
  - nbins (int) – Number of bins for the iterative pruning of positives
  - 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

  WARNING: Highly experimental/slow/etc: no theoretical grounds have been presented in any paper, nor proven

### `OverAxis`

class `mvpa.misc.transformers.``OverAxis`(transformer, axis=None)

  Bases: `object`

  Helper to apply transformer over specific axis

  Initialize transformer wrapper with an axis.

  Parameters:

  - transformer – A callable to be used
  - axis (None or int) – If None – apply transformer across all the data. If some int – over that axis

## Functions

`mvpa.misc.transformers.``Absolute`(x)

  Returns the elementwise absolute of any argument.

  Parameters: | x (scalar | sequence) –

`mvpa.misc.transformers.``FirstAxisMean`(x)

  Mean computed along the first axis.

`mvpa.misc.transformers.``FirstAxisSumNotZero`(x)

  Sum computed over first axis of whether the values are not equal to zero.

`mvpa.misc.transformers.``GrandMean`(x)

  Just what the name suggests.

`mvpa.misc.transformers.``Identity`(x)

  Return whatever it was called with.

`mvpa.misc.transformers.``L1Normed`(x, norm=1.0, reverse=False)

  Norm the values so that L_1 norm (sum|x|) becomes norm

`mvpa.misc.transformers.``L2Normed`(x, norm=1.0, reverse=False)

  Norm the values so that regular vector norm becomes norm

  More verbose: Norm that the sum of the squared elements of the returned vector becomes norm.

`mvpa.misc.transformers.``OneMinus`(x)

  Returns elementwise ‘1 - x’ of any argument.

`mvpa.misc.transformers.``RankOrder`(x, reverse=False)

  Rank-order by value. Highest gets 0

`mvpa.misc.transformers.``ReverseRankOrder`(x)

  Convinience functor

`mvpa.misc.transformers.``SecondAxisMaxOfAbs`(x)

  Max of absolute values along the 2nd axis

`mvpa.misc.transformers.``SecondAxisMean`(x)

  Mean across 2nd axis

  Use cases:
    - to combine multiple sensitivities to get sense about mean sensitivity across splits

`mvpa.misc.transformers.``SecondAxisSumOfAbs`(x)

  Sum of absolute values along the 2nd axis

  Use cases:
    - to combine multiple sensitivities to get sense about what features are most influential

### Navigation

- index
- next |
- previous |
- ExpPsy Project |
- NeuroDebian Project |
- PyMVPA 0.4.x Home |
- PyMVPA Home |
- Documentation »
- Module Reference »