Proxy/Adaptor class for SciPy distributions.
All distributions from SciPy’s ‘stats’ module can be used with this class.
Examples
>>> import numpy as np
>>> from scipy import stats
>>> from mvpa2.clfs.stats import FixedNullDist
>>>
>>> dist = FixedNullDist(stats.norm(loc=2, scale=4), tail='left')
>>> dist.p(2)
0.5
>>>
>>> dist.cdf(np.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(np.arange(5))
array([ 0.69146246, 0.59870633, 0.5 , 0.40129367, 0.30853754])
Parameters : | dist : distribution object
enable_ca : None or list of str
disable_ca : None or list of str
tail : {‘left’, ‘right’, ‘any’, ‘both’}
descr : str
|
---|
Return value of the cumulative distribution function at x.
Does nothing since the distribution is already fixed.