-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
feature(geomean): add geomean function #6223
Conversation
e2c41a9
to
cf2dc9a
Compare
@alexcjohnson should this be supported in other places like histfunc etc? |
@nicolaskruchten is that referring to just geomean or the entire categoryorder attribute? |
geomean: all the other aggregation functions you can sort by (sum, mean, median) are also supported in a few other places like |
I'd be down to tackle that in another PR if you can list where else to add the geomean statistic. |
Wondering geomean may not be the best naming as it could be point to our |
On another note, we are wondering why the automatic |
yea, edit: a quick goog/bing search shows the wikipedia article of Geometric mean with a search query of |
I was gonna ask you guys the same thing lol. |
I can try rebasing these commits on master and force pushing to see if that triggers the CI? |
Force pushing is discouraged on open pull requests as it could confuse reviewers. |
@antoinerg any idea how we could trigger CI runs on this pull? |
I see your point, though I think in context it's pretty clear. Looking around I see Harmonic mean commonly refers to the inverse of the mean of inverses (see eg npm and python stdlib) so let's stay away from that. But given that we all agree
Yes, that would be nice. I only see two more places we could add this, and one of them (the aggregate transform) is deprecated so I'm happy to ignore that. So Two frustrating things though: (1) we weren't consistent about the naming - for (2) The implementation for |
I'd vote for |
Ah yeah I remember these. Well, probably reason enough not to do extra work here then :) |
@archmoj I'm not sure how to fix the following error: https://app.circleci.com/pipelines/github/plotly/plotly.js/10836/workflows/443b723f-0ded-4052-9189-1977b51761ae/jobs/238687?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-checks-link&utm_content=summary
Also if you could tell me how to run just a specific test locally that would be great! |
fix geometricMean computation
@prabhathc Could you please fetch |
@archmoj done, merge caused the Note: the same test failure from 2 years ago still occurs, that I'm still not sure how to resolve |
To reflect the changes to the API, please run npm run schema && git add test/plot-schema.json && git commit -m "update plot-schema diff" |
Co-authored-by: Mojtaba Samimi <[email protected]>
@archmoj done, all the tests finally pass! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done.
💃
Thank you!
Add geomean function, closes #6152!