elbow_helper.multi_criteria module
Phase M2: the subtractive-sign modified BIC for elbow_helper.robust_knees().
Ported from the validated research/multiknee/criteria.py (see ELBOW-en.tex
section 14 and research/multiknee/RESULTS.md for the derivation, the
sign-convention ambiguity, and why the subtractive form is the one shipped:
0.85 overall exact-k accuracy and a 0% false-positive rate on flat data,
versus 0.77 and 11% for the literal additive form).
- elbow_helper.multi_criteria.modified_bic(seg)[source]
Zhang-Siegmund-inspired modified BIC, subtractive sign convention.
mBIC = n*ln(sse/n) + 3*m*ln(n) - sum(ln(l_j / n)),m = kthe number of breakpoints andl_jthe segment lengths. Lower is better. SeeELBOW-en.texsection 18 for the derivation and why the segment-length term is subtracted rather than added.- Parameters:
seg (Segmentation) – A candidate segmentation, carrying
n,sse,kandsegment_lengths.- Returns:
The subtractive-sign modified BIC score; lower is better.
- Return type: