fix: numeric correctness (statistics, metrics, parsing) - #7
Open
skymanbp wants to merge 1 commit into
Open
Conversation
- Int mean/median widen per element instead of wrapping at 2^63. - correlation uses the centered two-pass form, clamped: the one-pass form returned |r| > 1, NaN, or a flipped sign on offset data. - skewness computes population g1, the formula the docs define; the old factor was off by sqrt((n-1)/n). - variance of n < 2 is NaN (scatter kernels included), not a fake 0 that made singleton groups look constant. - mse/mae/r2/accuracy/logLoss average over compared pairs and refuse to score zero predictions; meanSquaredError guards length mismatch. - readInt rejects overflow instead of wrapping. - Double parsing is correctly rounded: exact byte-level reference (clamped exponents), Clinger fast path, Infinity round-trips.
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.
Fork validation PR. 19 files; local test all exit 0 (main 1111, parsing 151, learn-internal 194, fastcsv 61); fourmolu clean.