![]() |
Multivariate Pattern Analysis in Python |
Inheritance diagram for mvpa.clfs.stats:
Estimator for classifier error distributions.
Bases: mvpa.clfs.stats.AdaptiveNullDist
Adaptive Normal Distribution: params are (0, sqrt(1/nfeatures))
Note
Available state variables:
(States enabled by default are listed with +)
Parameters: |
|
---|
Bases: mvpa.clfs.stats.FixedNullDist
Adaptive distribution which adjusts parameters according to the data
WiP: internal implementation might change
Note
Available state variables:
(States enabled by default are listed with +)
Parameters: |
|
---|
Cares about dimensionality of the feature space in measure
Bases: mvpa.clfs.stats.AdaptiveNullDist
Adaptive rdist: params are (nfeatures-1, 0, 1)
Note
Available state variables:
(States enabled by default are listed with +)
Parameters: |
|
---|
Bases: mvpa.clfs.stats.NullDist
Proxy/Adaptor class for SciPy distributions.
All distributions from SciPy’s ‘stats’ module can be used with this class.
>>> import numpy as N
>>> from scipy import stats
>>> from mvpa.clfs.stats import FixedNullDist
>>>
>>> dist = FixedNullDist(stats.norm(loc=2, scale=4))
>>> dist.p(2)
0.5
>>>
>>> dist.cdf(N.arange(5))
array([ 0.30853754, 0.40129367, 0.5 , 0.59870633, 0.69146246])
>>>
>>> dist = FixedNullDist(stats.norm(loc=2, scale=4), tail='right')
>>> dist.p(N.arange(5))
array([ 0.69146246, 0.59870633, 0.5 , 0.40129367, 0.30853754])
Note
Available state variables:
(States enabled by default are listed with +)
Parameters: |
|
---|
Return value of the cumulative distribution function at x.
Does nothing since the distribution is already fixed.
Bases: mvpa.clfs.stats.NullDist
Null-hypothesis distribution is estimated from randomly permuted data labels.
The distribution is estimated by calling fit() with an appropriate DatasetMeasure or TransferError instance and a training and a validation dataset (in case of a TransferError). For a customizable amount of cycles the training data labels are permuted and the corresponding measure computed. In case of a TransferError this is the error when predicting the correct labels of the validation dataset.
The distribution can be queried using the cdf() method, which can be configured to report probabilities/frequencies from left or right tail, i.e. fraction of the distribution that is lower or larger than some critical value.
This class also supports FeaturewiseDatasetMeasure. In that case cdf() returns an array of featurewise probabilities/frequencies.
Note
Available state variables:
(States enabled by default are listed with +)
Initialize Monte-Carlo Permutation Null-hypothesis testing
Parameters: |
|
---|
Return value of the cumulative distribution function at x.
Clean stored distributions
Storing all of the distributions might be too expensive (e.g. in case of Nonparametric), and the scope of the object might be too broad to wait for it to be destroyed. Clean would bind dist_samples to empty list to let gc revoke the memory.
Fit the distribution by performing multiple cycles which repeatedly permuted labels in the training dataset.
Parameters: |
|
---|
Bases: object
Non-parametric 1d distribution – derives cdf based on stored values.
Introduced to complement parametric distributions present in scipy.stats.
Parameters: |
|
---|
Returns the cdf value at x.
Bases: mvpa.misc.state.ClassWithCollections
Base class for null-hypothesis testing.
Note
Available state variables:
(States enabled by default are listed with +)
See also
Please refer to the documentation of the base class for more information:
Cheap initialization.
Parameters: |
|
---|
Implementations return the value of the cumulative distribution function (left or right tail dpending on the setting).
Implement to fit the distribution to the data.
Returns the p-value for values of x. Returned values are determined left, right, or from any tail depending on the constructor setting.
In case a FeaturewiseDatasetMeasure was used to estimate the distribution the method returns an array. In that case x can be a scalar value or an array of a matching shape.
Cheater for human beings – wraps dist if needed with some NullDist
tail and other arguments are assumed to be default as in NullDist/MCNullDist
Compute the mean over the given axis ignoring nans.
Parameters: |
|
---|---|
Results : |
|