elbow_helper.multi_pipeline module

Phase M4: the public robust_knees (plural) orchestration.

Ships the exact combination validated in research/multiknee/RESULTS.md and derived in ELBOW-en.tex (sections 5-20): dynamic-program search, the subtractive-sign modified BIC as the selection criterion, and a Bonferroni-gated sequential permutation test layered on top by default, matching this package’s design priority of minimising false-positive knees even at the cost of more abstentions.

Segments are independent (discontinuous) OLS lines, not the continuous broken-line model elbow_helper.robust_knee() uses; see ELBOW-en.tex section 5 for why that difference is deliberate.

Author

Warith Harchaoui, <warith.harchaoui@deraison.ai>

elbow_helper.multi_pipeline.robust_knees(x, y=None, config=None)[source]

Detect zero or more knees, with the same abstain-rather-than-guess discipline.

Unlike robust_knee(), an empty result is not an abstention: it is the pipeline’s confident conclusion that the data has no real breakpoint, having survived the same search and false-positive gates a nonempty result would have to survive. Only preprocessing failures (bad input, too little data, zero range) return InvalidKnees.

Parameters:
  • x (array-like) – The curve: x[i] maps to y[i]. y may be omitted, in which case x is taken to be the y-values alone against an implicit 0, 1, ..., n-1, as in robust_knee(). No curve or direction is needed: segments may alternate slope sign freely.

  • y (array-like) – The curve: x[i] maps to y[i]. y may be omitted, in which case x is taken to be the y-values alone against an implicit 0, 1, ..., n-1, as in robust_knee(). No curve or direction is needed: segments may alternate slope sign freely.

  • config (RobustKneesConfig, optional) – Search size, false-positive-control settings. Defaults to RobustKneesConfig.

Returns:

A Knees (with zero or more KneeEstimate, and diagnostics from every stage) or an InvalidKnees (with a reason code, for unusable input only).

Return type:

MultiKneeResult