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

add "statistics" category to quantiles #277

Closed
soxofaan opened this issue Sep 21, 2021 · 8 comments · Fixed by #294
Closed

add "statistics" category to quantiles #277

soxofaan opened this issue Sep 21, 2021 · 8 comments · Fixed by #294

Comments

@soxofaan
Copy link
Member

soxofaan commented Sep 21, 2021

"id": "quantiles",
"summary": "Quantiles",
"description": "Calculates quantiles, which are cut points dividing the range of a probability distribution into either\n\n* intervals corresponding to the given `probabilities` or\n* (nearly) equal-sized intervals (q-quantiles based on the parameter `q`).\n\nEither the parameter `probabilities` or `q` must be specified, otherwise the `QuantilesParameterMissing` exception is thrown. If both parameters are set the `QuantilesParameterConflict` exception is thrown.",
"categories": [
"math"
],

Strictly speaking,quantiles can not be used directly as a reducer (you need an additional array_element to get a scalar value from its output array), but I think it makes sense to add it to the "reducer" category because it will be used often in reduce contexts.

@m-mohr
Copy link
Member

m-mohr commented Oct 7, 2021

Hmm, I'm not sure I agree. This would make it less clear what a reducer strictly is. It would not just be quantiles, too, as there are more similar processes, e.g. extrema.

Looking at the reducers right now, I'd even argue listing the array_ functions is a bit strange and I'd consider removing the reducer category from them.

@m-mohr m-mohr added the question Further information is requested label Oct 7, 2021
@soxofaan
Copy link
Member Author

soxofaan commented Oct 7, 2021

I guess it depends on what a "category" means to you,
if you see it as some kind of (data) type/schema or contract, then yes, quantiles is not a reducer (because it doesn't convert a collection to a single value). But then reduce_dimension or reduce_spatial should also not be listed there.

To me, the categories are just thematic labels to help with finding processes you need for a particular use case. In case of quantiles: because median (a particular quantile) is listed as reducer, I'd also expect to find other quantiles there.

Other approach: change category reducer to reduce (like form of category export) or reducing (like form of category sorting) to make it sound less strict.

@m-mohr
Copy link
Member

m-mohr commented Oct 7, 2021

Those are labels, but they should still be somewhat consistently chosen. So we'd need to add them not just to quantiles, but also to extrema. I'm just trying to avoid that someone simply tries to use quantiles exactly as e.g. mean and then it fails. The docs refer to reducers and say that you can use them, but in the quantiles/extrema/... cases it's not as simple...

@soxofaan
Copy link
Member Author

soxofaan commented Oct 8, 2021

But then reduce_dimension and reduce_spatial should also not be listed there.

Other solution: can't we also define a category "statistics" , to list these reduce/summary processes like median, mean, min, max, extrema, quantiles, ...
but not those array_ processes?

@m-mohr
Copy link
Member

m-mohr commented Oct 8, 2021

Yes, that sounds like a good solution, I think.

@soxofaan
Copy link
Member Author

soxofaan commented Oct 8, 2021

Meta question: can we label this ticket with something like "low-hanging-fruit" or "beginner-material" so that aspiring contributors can easily find simple issues to start working on.

e.g. for python client I started using "low hanging fruit": https://github.com/Open-EO/openeo-python-client/issues?q=is%3Aissue+is%3Aopen+label%3A%22low+hanging+fruit%22

@m-mohr
Copy link
Member

m-mohr commented Oct 8, 2021

I've re-added the "good first issue" label, which is common on GitHub.

@m-mohr m-mohr added good first issue enhancement patch and removed question Further information is requested labels Oct 8, 2021
@m-mohr m-mohr changed the title add "reducer" category to quantiles add "statistics" category to quantiles Oct 26, 2021
@m-mohr m-mohr self-assigned this Oct 26, 2021
@m-mohr m-mohr added this to the 1.2.0 milestone Oct 26, 2021
@m-mohr m-mohr linked a pull request Oct 26, 2021 that will close this issue
5 tasks
@m-mohr
Copy link
Member

m-mohr commented Oct 26, 2021

PR is available for review: #294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants