Table Of Contents

Previous topic

mvpa.misc.support

Next topic

mvpa.misc.vproperty

This Page

Quick search

mvpa.misc.transformers

Simply functors that transform something.

The comprehensive API documentation for this module, including all technical details, is available in the Epydoc-generated API reference for mvpa.misc.transformers (for developers).

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

See also

Derived classes might provide additional methods via their base classes. Please refer to the list of base classes (if it exists) at the begining of the DistPValue documentation.

Full API documentation of DistPValue in module mvpa.misc.transformers.

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

See also

Derived classes might provide additional methods via their base classes. Please refer to the list of base classes (if it exists) at the begining of the OverAxis documentation.

Full API documentation of OverAxis in module mvpa.misc.transformers.

Functions

mvpa.misc.transformers.Absolute(x)
Returns the elementwise absolute of any argument.

See also

Full API documentation of Absolute() in module mvpa.misc.transformers.

mvpa.misc.transformers.FirstAxisMean(x)
Mean computed along the first axis.

See also

Full API documentation of FirstAxisMean() in module mvpa.misc.transformers.

mvpa.misc.transformers.FirstAxisSumNotZero(x)
Sum computed over first axis of whether the values are not equal to zero.

See also

Full API documentation of FirstAxisSumNotZero() in module mvpa.misc.transformers.

mvpa.misc.transformers.GrandMean(x)
Just what the name suggests.

See also

Full API documentation of GrandMean() in module mvpa.misc.transformers.

mvpa.misc.transformers.Identity(x)
Return whatever it was called with.

See also

Full API documentation of Identity() in module mvpa.misc.transformers.

mvpa.misc.transformers.L1Normed(x, norm=1.0, reverse=False)
Norm the values so that L_1 norm (sum|x|) becomes norm

See also

Full API documentation of L1Normed() in module mvpa.misc.transformers.

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.

See also

Full API documentation of L2Normed() in module mvpa.misc.transformers.

mvpa.misc.transformers.OneMinus(x)
Returns elementwise ‘1 - x’ of any argument.

See also

Full API documentation of OneMinus() in module mvpa.misc.transformers.

mvpa.misc.transformers.RankOrder(x, reverse=False)
Rank-order by value. Highest gets 0

See also

Full API documentation of RankOrder() in module mvpa.misc.transformers.

mvpa.misc.transformers.ReverseRankOrder(x)
Convinience functor

See also

Full API documentation of ReverseRankOrder() in module mvpa.misc.transformers.

mvpa.misc.transformers.SecondAxisMaxOfAbs(x)
Max of absolute values along the 2nd axis

See also

Full API documentation of SecondAxisMaxOfAbs() in module mvpa.misc.transformers.

mvpa.misc.transformers.SecondAxisMean(x)

Mean across 2nd axis

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

See also

Full API documentation of SecondAxisMean() in module mvpa.misc.transformers.

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

See also

Full API documentation of SecondAxisSumOfAbs() in module mvpa.misc.transformers.