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

[FR] Add percentile (quantile) aggregation #1935

Closed
2 of 6 tasks
tadejsv opened this issue Jul 11, 2022 · 2 comments · Fixed by #1937
Closed
2 of 6 tasks

[FR] Add percentile (quantile) aggregation #1935

tadejsv opened this issue Jul 11, 2022 · 2 comments · Fixed by #1937
Labels
enhancement Code enhancement

Comments

@tadejsv
Copy link

tadejsv commented Jul 11, 2022

Proposal Summary

I would like an aggregation that could compute a percentile/quantile. These values can sometimes be more informative than just mean / standard deviation (which are available now).

What areas of FiftyOne does this feature affect?

  • App: FiftyOne application
  • Core: Core fiftyone Python library
  • Server: FiftyOne server

Willingness to contribute

The FiftyOne Community encourages new feature contributions. Would you or
another member of your organization be willing to contribute an implementation
of this feature?

  • Yes. I can contribute this feature independently.
  • Yes. I would be willing to contribute this feature with guidance from
    the FiftyOne community.
  • No. I cannot contribute this feature at this time.
@tadejsv tadejsv added the enhancement Code enhancement label Jul 11, 2022
@brimoor
Copy link
Contributor

brimoor commented Jul 12, 2022

Hi @tadejsv 👋

Makes sense! I added support for this in #1937.

Note that, in the meantime, you can compute quantiles in an equivalent but less efficient way as follows:

import numpy as np
import fiftyone as fo
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset("quickstart")

values = dataset.values("uniqueness")
print(np.quantile(values, [0.25, 0.5, 0.75, 0.9], method="inverted_cdf"))

values = dataset.values("predictions.detections.confidence", unwind=True)
print(np.quantile(values, [0.25, 0.5, 0.75, 0.9], method="inverted_cdf"))

@tadejsv
Copy link
Author

tadejsv commented Jul 13, 2022

Great, thank you 🙏

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

Successfully merging a pull request may close this issue.

2 participants