Skip to content

Verify PRELIM.m's boxcox() call against the project's known Box-Cox fix history #45

Description

@andremun

Summary

This one is explicitly unconfirmed — flagged for verification, not asserted as a bug. PRELIM.m
calls boxcox(aux(~idx)) for both feature and performance normalisation (core/PRELIM.m:161, 170). No local boxcox.m exists anywhere in this repo (confirmed directly — no match anywhere
in the tree), so this resolves to whichever boxcox is on the MATLAB path at runtime — most
likely a toolbox function, though this couldn't be confirmed without a MATLAB runtime
(unavailable in the environment this audit ran in).

This is worth checking specifically because of established project history: a prior Box-Cox
complex-value bug is on record as having been "resolved by replacing MATLAB's internal
boxcox() with the direct formula, not by masking the output" — a principle example of this
project's root-cause-over-symptom-fix philosophy. It's unclear whether that fix applied to this
exact MATLAB call site, to the Python port's equivalent, or to an earlier version of this file —
the reference is ambiguous from documentation alone.

Mitigating factor, also confirmed directly: X/Y are explicitly shifted to strictly-positive
before this call (X = X - min(X) + 1 at core/PRELIM.m:157, Y = Y - minY + eps at
core/PRELIM.m:166), which independently prevents the classic negative/zero-input
complex-output failure mode regardless of which boxcox implementation actually runs.

Proposed change

Confirm directly (with a MATLAB session available) which boxcox this call resolves to, and
whether the historical fix referenced above was ever applied to this file specifically. If it
was and has since regressed, restore it. If the reference was always about a different
codebase/file, close this with that clarification on record so it doesn't get re-raised based on
the same ambiguous memory.

Acceptance criteria

  • Confirmed which boxcox implementation PRELIM.m actually calls
  • Historical fix's original scope confirmed (this file, the Python port, or elsewhere)
  • Closed either as "no action needed, positive-shift guard is sufficient" or with a concrete
    fix if a real gap is confirmed

Part of the v0.9.1 milestone. Source: full-file audit pass over every core algorithm file plus previously-grepped-only utility files. Independent of batches 1, 2, 3, 5. A verification task, not a fix — do whenever a MATLAB session is available to check.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions