Class FixedNullDist
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 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])
|
|
|
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
|
|
|
__repr__(self,
prefixes=[])
String definition of the object of ClassWithCollections object |
source code
|
|
Inherited from NullDist :
p
Inherited from misc.state.ClassWithCollections :
__getattribute__ ,
__new__ ,
__setattr__ ,
__str__ ,
reset
Inherited from object :
__delattr__ ,
__format__ ,
__hash__ ,
__reduce__ ,
__reduce_ex__ ,
__sizeof__ ,
__subclasshook__
|
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:
NullDist.fit
|
Return value of the cumulative distribution function at x .
- Overrides:
NullDist.cdf
|
__repr__(self,
prefixes=[])
(Representation operator)
| source code
|
String definition of the object of ClassWithCollections object
- Parameters:
fullname - Either to include full name of the module
prefixes - What other prefixes to prepend to list of arguments
- Overrides:
object.__repr__
- (inherited documentation)
|