-
Notifications
You must be signed in to change notification settings - Fork 156
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
refactor(stdlib): rename percentile to quantile and implement percent… #1107
Conversation
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.
Looks good, with one small typo.
What are your thoughts? Does this change increase the readability and understandability of the code/stdlib?
It address the is the value between 0-100 or 0-1 well but does it create too many functions that are too similar?
docs/SPEC.md
Outdated
@@ -1592,10 +1592,10 @@ Median is defined as: | |||
|
|||
median = (method="estimate_tdigest", compression=0.0, tables=<-) => | |||
tables | |||
|> percentile(percentile:0.5, method:method, compression:compression) | |||
|> quantile(quantile:0.5, method:method, compression:compression) |
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.
Below the argument is defined as q
not quantile.
@nathanielc I think it's probably unnecessary, even though I put up the PR :) . They're exactly the same function, their arguments are just at different scales. I think I prefer to have just one way to perform a quantile calculation. I don't see it as a huge mental burden to switch between a [0, 1] scale vs [0, 100]. |
OK, in that case should we just rename it to |
I would prefer it called quantile, especially if we are using values between 0 and 1. Currently it's a little inconsistent. But we don't need both functions. |
BREAKING CHANGE: Rename the percentile function to quantile and rename the percentile parameter to q. Fixes #1072.
e3925f0
to
445a2cf
Compare
…ile in terms of quantile
BREAKING CHANGE: Rename the percentile function to quantile. Also rename the percentile
parameter to q. Also implement a new percentile function that takes a parameter p that
is an integer between 0 and 100 inclusive. The new percentile function is defined in
terms of quantile.
Fixes #1072.
Done checklist