Audit and stabilise the mathematical core - #9
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Audits every mathematical quantity the package exports before new features are layered on top.
Added
tests/test_mathematical_core.py— 41 hand-computable tests covering membership representation, the fuzzy operators, sufficiency, necessity, subset relations, calibration, truth-table classification and minimisation. Each assertion carries the arithmetic in a comment so it can be checked against the definition without running the code.Boundary and degenerate behaviour is now pinned explicitly:
Σ X = 0Σ Y = 0Σ (1 − min(X,Y)) = 0ValueError— never imputedValueError— never clippeddocs/mathematical_validation.md— the audit table: object, equation, implementation, test, tolerance and validation status, plus full definitions for the calibration transformations and row coding.Findings
No behaviour changed; this is verification and documentation only. 177 tests pass at 100% coverage.
Summary by cubic
Audit the mathematical core of
setqcawith hand-computable tests and clear boundary conventions to stabilize metrics, operators, calibration, truth tables, and minimisation. No behavior changes.tests/test_mathematical_core.pywith 41 hand-computable tests covering membership, fuzzy operators, subset relations, sufficiency/necessity (consistency, coverage, PRI, RoN), calibration, truth-table coding, and minimisation.docs/mathematical_validation.mdwith equations, implementation links, test references, tolerances, and validation status; linked inmkdocs.ymlunder Validation.ValueError(no clipping or imputation).Written for commit 77bb834. Summary will update on new commits.