Skip to content
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

summarize to (optionally) use MEDIAN instead of MEAN as central summary #1420

Open
tbhallett opened this issue Jul 11, 2024 · 0 comments · May be fixed by #1457
Open

summarize to (optionally) use MEDIAN instead of MEAN as central summary #1420

tbhallett opened this issue Jul 11, 2024 · 0 comments · May be fixed by #1457
Assignees

Comments

@tbhallett
Copy link
Collaborator

tbhallett commented Jul 11, 2024

The summarize() function is hard-wired to use the MEAN as the central summary measure of the model results it is "summarising". 'mean' is also used as the name of the column giving the central summary measure; and only_mean is the kwarg used to get only the central summary measure.

... but sometimes we want the MEDIAN!

Simplest option would be to leave this function alone, and create a new one called summarize_with_median() that does similarly but uses median (for the stat, the name of the column and the kwarg). (Or, accomplish the same external behaviour through refactoring.) Or could create a kwarg stat: Literal["mean", "median"] that defaults to mean; and when median gives the title column of median, and we refactor the kwarg to be only_central instead of only_mean. (We could avoid wide-spread refactoring by also accepting an argument for only_mean, under certain circumstances.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
1 participant