est.core.monotonic.split_piecewise_monotonic(values: Sequence[float]) List[slice][source]#

The provided values are piecewise monotonic which means that it consists of sections that are either monotonically increasing (∀ i ≤ j, x[i] ≤ x[j]) or monotonically decreasing (∀ i ≤ j, x[i] ≥ x[j]). Note that a list of identical values is both monotonically increasing and decreasing.

This method returns the disjoint slices representing monotonic sections.