Package mvpa :: Package clfs :: Module stats :: Class FixedNullDist
[hide private]
[frames] | no frames]

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])
Nested Classes [hide private]

Inherited from misc.state.ClassWithCollections: __metaclass__

Instance Methods [hide private]
 
__init__(self, dist, **kwargs)
Cheap initialization.
source code
 
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 NullDist (private): _setTail

Inherited from misc.state.ClassWithCollections: __getattribute__, __new__, __setattr__, __str__, reset

Inherited from object: __delattr__, __format__, __hash__, __reduce__, __reduce_ex__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from NullDist: tail

Inherited from NullDist (private): _ATTRIBUTE_COLLECTIONS

Inherited from misc.state.ClassWithCollections: _DEV__doc__, descr

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, dist, **kwargs)
(Constructor)

source code 
Cheap initialization.
Overrides: object.__init__

fit(self, measure, wdata, vdata=None)

source code 
Does nothing since the distribution is already fixed.
Overrides: NullDist.fit

cdf(self, x)

source code 
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)