Skip to content

Remove median(::MvLogNormal) #1966

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

devmotion
Copy link
Member

The PR removes the definition of median(::MvLogNormal). It was added in #455 but IMO that should have been discussed more thoroughly.

  1. The marginal median is just one of multiple concepts of multivariate medians, see e.g. https://en.wikipedia.org/wiki/Median#Multivariate_median.

  2. There's no established concept of multivariate medians in Distributions as indicated by the fact that median is not defined for any other multivariate distribution (not even MvNormal).

  3. The definition of median seems to suggest that quantile etc. should be defined as well, which is not the case.

As such, I think the existence of this definition is a bug.


Alternatively, Distributions could adopt and clearly document a definition of (marginal?) medians for multivariate distributions. In this case, the fix would be to add definitions of median to other distributions such as MvNormal etc. as well.

@codecov-commenter
Copy link

codecov-commenter commented Apr 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.27%. Comparing base (da3a230) to head (352c972).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1966   +/-   ##
=======================================
  Coverage   86.27%   86.27%           
=======================================
  Files         146      146           
  Lines        8777     8771    -6     
=======================================
- Hits         7572     7567    -5     
+ Misses       1205     1204    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants