Inheritance diagram for nipy.algorithms.statistics.models.utils:
General matrix and other utilities for statistics
Bases: object
A basic step function
Values at the ends are handled in the simplest way possible: everything to the left of x[0] is set to ival; everything to the right of x[-1] is set to y[-1].
Examples
>>> x = np.arange(20)
>>> y = np.arange(20)
>>> f = StepFunction(x, y)
>>>
>>> f(3.2)
3.0
>>> res = f([[3.2, 4.5],[24, -3.1]])
>>> np.all(res == [[ 3, 4],
... [19, 0]])
True
Return the ECDF of an array as a step function.
Median Absolute Deviation:
median(abs(a - median(a))) / c
Given a monotone function x (no checking is done to verify monotonicity) and a set of x values, return an linearly interpolated approximation to its inverse from its values on x.