test(vetting): verify 2D first-order with MATLAB R2026a - #468
Open
vjaganat90 wants to merge 2 commits into
Open
Conversation
vjaganat90
marked this pull request as ready for review
September 1, 2026 14:37
vjaganat90
force-pushed
the
2d_firstorder_matlab_script
branch
2 times, most recently
from
September 2, 2026 14:11
1c9ab00 to
db7f88e
Compare
vjaganat90
force-pushed
the
2d_firstorder_matlab_script
branch
from
September 2, 2026 15:49
db7f88e to
c9029ad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this is needed
The 2D first-order family still carried a MATLAB correctness claim without a checked-in MATLAB generator. The registry claimed 33
oracle=matlabfeatures, whiletest_2d_firstorder_matlab.hcontained 28 literals with no tool version, exact functions, recipe, benchmark, or runnable provenance. Those two sets did not even agree: six registry claims had no MATLAB assertion, while the header called histogramUNIFORMITYa MATLAB assertion even though the registry correctly treated PyRadiomics as its oracle.The old audit had already found the central problem: several percentile literals were Nyxus outputs, not values produced by MATLAB or Octave. This PR replaces that inherited claim with a licensed MATLAB R2026a run and lets the measured results decide the disposition feature by feature.
What the licensed run establishes
gen_firstorder2d_matlab.mdownloads the canonical pixel fixture and golden header from the movingPolusAI/nyxusmaintree. It extracts the 154 fixture intensities directly fromtests/test_data.h, invokes native MATLAB statistics built-ins, checks the generated and pinned feature sets in both directions, prints full-precision values side by side, and fails if a pin exceeds its declared band.MATLAB honestly covers 31 features:
The C++ table now pins the exact MATLAB R2026a values. For the eight percentile-derived features, Nyxus uses its fixed 100-bin interpolated CDF while MATLAB evaluates the raw sample. They still agree within the measured
rel=3e-2band; the worst residual isQCODat 2.75%. The other 23 assertions use the SPEC same-definition tier,rel=1e-3.This restores honest MATLAB coverage for
P01,P25,P75,P99, andQCOD, and replaces the old Nyxus-derived pins forP10,P90, andINTERQUARTILE_RANGEwith the actual MATLAB values.What remains outside MATLAB
This PR does not force incompatible semantics into the MATLAB file:
UNIFORMITYremains PyRadiomics-vetted. Producing it here would require reconstructing Nyxus histogram discretization.MEDIAN_ABSOLUTE_DEVIATIONis moved to regression: MATLABmad(x,1)is the median absolute deviation, while Nyxus computes the mean absolute deviation about the median.ROBUST_MEANremains regression: MATLAB rank trimming and Nyxus histogram-derived P10/P90 selection are different definitions.ENTROPYandROBUST_MEAN_ABSOLUTE_DEVIATIONremain PyRadiomics-vetted. The redundant standalone PyRadiomics assertion for the latter is removed; the table-driven oracle assertion already covers it. (I can revert this redundant code elimination but I think we should remove it here)The honest family result is therefore 34/36 features vetted by at least one oracle, with the two unresolved semantics explicitly regression-only. The generated global report drops two stale vetting claims instead of preserving an inflated headline.
SPEC alignment
firstorder2d.md, enumerating the MATLAB, PyRadiomics, IBSI, and two production-only regression config points.MATLAB remains an offline golden generator; CI consumes only the checked-in C++ literals.