Repository navigation
Re-record statcond ANOVA fixtures for double-precision ANOVA (EEGLAB #977) - #16
Merged
Merged
Conversation
…#977) Co-authored-by: Suraj Ranganath <[email protected]>
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
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.
Replaces
regression_tests/t_statcond.matso the ANOVA expected values match EEGLAB after #977 (merged0963be9d81acc5b66e84f8d3d7c89e3ce127cc4on develop;which statcondresolved tofunctions/statistics/statcond.m). This commit changes that one file. It is not a Git LFS path.What changed
Only the stored
valueof cases 3-6 and 15-30 was replaced. The recorder loads the original.mat, replacestest_N.valuefor N = 3:6 and 15:30, and writes withsave(..., '-v7').inputs,absTol/relTol, and every other case are kept. The inputs and the 0 tolerances are unchanged.Of the 79 variables, 59 are raw byte-identical compressed blocks:
inputs, test_1, test_2, test_7..14, and test_31..78. Only test_3..6 and test_15..30 differ, plus the 128-byte header text:Platform: GLNXA64, Created on: Sat Oct 17 14:15:44 2026replaces the old PCWIN64 header. The new file is 324986 bytes (sha25638fca08a69a7eb045c38874d303a652196c70ef4e4962682c774130b8a5a239f); the old file was 314608 bytes.How they were recorded
MATLAB 25.2.0.3360999 (R2025b) Update 7, glnxa64, run with
matlab-batch, on EEGLABd0963be9.rng('default')is called before each case, ast_statcond.mdoes (TestMethodSetup). The TestClassSetup spelling fix (homogeneoustohomogenous,inhomogeneoustoinhomogenous) is applied to a copy of the inputs only.nargoutis taken fromt_statcond.m.Verification
The checker re-ran all 78 cases against each fixture with
isequalnand an exact class/size check:d0963be9: 78/78 SAMEd0963be9: exactly the 20 target cases DIFF, 58 SAME. The resampling cases 31-78, including the 3-condition ANOVA ones, are unchanged by #9778ac485f6: 78/78 SAMETwo separate MATLAB sessions wrote files that differ only in the header timestamp. Every byte after the 128-byte header is identical, and all 79 variable blocks are raw-identical.
The new values were compared with eegprep's Python statcond (develop
d1b85272statistics code, run from worktreee606f2b1, whose statistics code is identical). This used the double values eegprep computes internally. eegprep's MATLAB-compatible output still casts ANOVA F/p to float32. df matches exactly in every case. Classes are now double for F and p (previously single); df was already double.The table is the max abs and max rel diff over all elements, with the rel diff also in units of double eps. "bit-equal" counts elements that are identical bit for bit.
For comparison, the old single-precision fixtures were off from these double values by up to 2.6e-4 abs in F (case 16).
anova2rm_cell): F is within 2.5e3 ulp (5.7e-13 rel) and p within 2.1e4 ulp (4.7e-12 rel). This comes from different summation order in the cancelling sums of squares, amplified by fcdf's conditioning. It is still at the double-rounding level, with no sign of single precision.Recorder
These scripts are not part of the commit. Together they re-record the same cases.
st977_common.m and st977_record.m
st977_common.mst977_record.m