models.monotone_violations()
The indices i (from 1) whose step from means[i - 1] goes
Usage
models.monotone_violations(
means,
direction,
tol=1e-09,
)against direction by more than tol times the curve’s largest absolute value.
Parameters
means: list of floatdirection: (1, -1) = 1tol: float = 1e-9
Returns
list of int
Examples
>>> from prospicio.models import monotone_violations
>>> monotone_violations([1.0, 2.0, 1.5, 3.0], 1)[2]