![]() |
Multivariate Pattern Analysis in Python |
Estimator for classifier error distributions.
The comprehensive API documentation for this module, including all technical details, is available in the Epydoc-generated API reference for mvpa.clfs.stats (for developers).
Bases: mvpa.clfs.stats.AdaptiveNullDist
Adaptive rdist: params are (0, sqrt(1/nfeatures))
Parameters: |
|
---|
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 AdaptiveNormal documentation.
Full API documentation of AdaptiveNormal in module mvpa.clfs.stats.
Bases: mvpa.clfs.stats.FixedNullDist
Adaptive distribution which adjusts parameters according to the data
WiP: internal implementation might change
Parameters: |
|
---|
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 AdaptiveNullDist documentation.
Full API documentation of AdaptiveNullDist in module mvpa.clfs.stats.
Bases: mvpa.clfs.stats.AdaptiveNullDist
Adaptive rdist: params are (nfeatures-1, 0, 1)
Parameters: |
|
---|
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 AdaptiveRDist documentation.
Full API documentation of AdaptiveRDist in module mvpa.clfs.stats.
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])
Parameters: |
|
---|
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 FixedNullDist documentation.
Full API documentation of FixedNullDist in module mvpa.clfs.stats.
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.
Initialize Monte-Carlo Permutation Null-hypothesis testing
Parameters: |
|
---|
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: |
|
---|
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 MCNullDist documentation.
Full API documentation of MCNullDist in module mvpa.clfs.stats.
Bases: object
Non-parametric 1d distribution – derives cdf based on stored values.
Introduced to complement parametric distributions present in scipy.stats.
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 Nonparametric documentation.
Full API documentation of Nonparametric in module mvpa.clfs.stats.
Bases: mvpa.misc.state.ClassWithCollections
Base class for null-hypothesis testing.
Cheap initialization.
Parameters: |
|
---|
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.
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 NullDist documentation.
Full API documentation of NullDist in module mvpa.clfs.stats.
Cheater for human beings – wraps dist if needed with some NullDist
tail and other arguments are assumed to be default as in NullDist/MCNullDist
See also
Full API documentation of autoNullDist() in module mvpa.clfs.stats.
Compute the mean over the given axis ignoring nans.
Parameters: |
|
---|---|
Results: |
|
See also
Full API documentation of nanmean() in module mvpa.clfs.stats.