Repository navigation
Conversation
Deprecate variance, standardDeviation, VarianceAccumulator, and VarianceAlgo, directing callers to mir.stat.descriptive. Cover all function overloads and accumulator specializations while preserving the legacy implementations and online defaults. Document the mir-stat dependency and replacement import, its hybrid default, and potential rounding differences. Explain that enum types are distinct and code using accumulator state or constructors needs separate migration review. AI-Assisted-By: Codex (GPT-6 Astra Medium)
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.
Deprecate
variance,standardDeviation,VarianceAccumulator, andVarianceAlgoinmir.math.stat, directing callers to the corresponding exports frommir.stat.descriptive.This supersedes the approach proposed in #465 by directing statistical development to mir-stat while preserving the existing mir-algorithm implementations, signatures, accumulator state, and online defaults.
Migration and compatibility
All function overloads and accumulator specializations receive deprecation messages. Existing calls retain their behavior, but builds treating deprecations as errors (
-de) will require migration.The module documentation explains how to add mir-stat and update selective imports. It also identifies migration differences: mir-stat defaults to hybrid variance, rounding may differ, the enum types are distinct, and code using accumulator state or constructors needs separate review.
This change does not deprecate the rest of
mir.math.stator add a dependency on mir-stat.Validation
mir_testharness.mir.stat.descriptiveimport compiled with-deand ran against mir-stat master after Use mir-stat hybrid variance for Scott's histogram rule mir-stat#193.The full repository test suite was not run locally.
AI-Assisted-By: Codex (GPT-6 Astra Medium)