Class FixedDist
source code
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 FixedDist
>>>
>>> dist = FixedDist(stats.norm(loc=2, scale=4))
>>> dist.cdf(2)
array(0.5)
>>>
>>> dist.cdf(N.arange(5))
array([ 0.30853754, 0.40129367, 0.5 , 0.59870633, 0.69146246])
>>>
>>> dist = FixedDist(stats.norm(loc=2, scale=4), tail='right')
>>> dist.cdf(N.arange(5))
array([ 0.69146246, 0.59870633, 0.5 , 0.40129367, 0.30853754])
|
|
|
fit(self,
measure,
wdata,
vdata=None)
Does nothing since the distribution is already fixed. |
source code
|
|
|
cdf(self,
x)
Return value of the cumulative distribution function at x . |
source code
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|
Inherited from object :
__class__
|
__init__(self,
dist,
**kwargs)
(Constructor)
| source code
|
Cheap initialization.
- Overrides:
object.__init__
|
Does nothing since the distribution is already fixed.
- Overrides:
Distribution.fit
|
Return value of the cumulative distribution function at x .
- Overrides:
Distribution.cdf
|