Skip to content

Improve description of statistical formulas#13567

Merged
magnesj merged 4 commits intodevfrom
improve-usability-statistical-functions
Feb 8, 2026
Merged

Improve description of statistical formulas#13567
magnesj merged 4 commits intodevfrom
improve-usability-statistical-functions

Conversation

@magnesj
Copy link
Member

@magnesj magnesj commented Feb 5, 2026

Add a general function to compute percentiles. Add detailed description of the formulas used to compute statistical values. Existing API is unchanged.

Use quantile for values in range [0..1] and percentile for values in range [0..100]

Preparations for #13175

@magnesj magnesj enabled auto-merge (squash) February 5, 2026 12:51
@magnesj magnesj requested review from jonjenssen and kriben February 5, 2026 12:51
@magnesj magnesj force-pushed the improve-usability-statistical-functions branch from 11cdbbc to d0cde69 Compare February 6, 2026 16:02
@magnesj magnesj requested review from kriben and removed request for jonjenssen February 6, 2026 16:03
@magnesj magnesj disabled auto-merge February 6, 2026 16:03
Copy link
Collaborator

@jonjenssen jonjenssen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe look for an alternative to asserts to avoid ResInsight crashing in release?

Copy link
Collaborator

@kriben kriben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Refactored percentile and quantile calculation logic for improved flexibility and maintainability. Added helper functions for quantile/percentile validation, introduced a new vector-based calculatePercentiles method, and updated calculateStatisticsCurves to use it. Refactored nearest-rank and interpolated percentile methods to accept percentiles as vectors and improved parameter validation. Enhanced documentation throughout and updated function signatures in the header for clarity.
@magnesj magnesj force-pushed the improve-usability-statistical-functions branch from 058506e to 12cfee0 Compare February 8, 2026 10:36
@magnesj magnesj merged commit af82135 into dev Feb 8, 2026
19 checks passed
@magnesj magnesj deleted the improve-usability-statistical-functions branch February 8, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments