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.
- 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) returnInvalidKnees.- Parameters:
x (array-like) – The curve:
x[i]maps toy[i].ymay be omitted, in which casexis taken to be the y-values alone against an implicit0, 1, ..., n-1, as inrobust_knee(). Nocurveordirectionis needed: segments may alternate slope sign freely.y (array-like) – The curve:
x[i]maps toy[i].ymay be omitted, in which casexis taken to be the y-values alone against an implicit0, 1, ..., n-1, as inrobust_knee(). Nocurveordirectionis 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 moreKneeEstimate, and diagnostics from every stage) or anInvalidKnees(with a reason code, for unusable input only).- Return type: