Percentile aggregator

Author: i404788Created Nov 21, 2023Updated Jun 7, 2025
LabelsenhancementC++

Feature Request

Add aggregator for percetiles (e.g. 99pt, 95pt).

Description of Problem:

For a cost-benefit analysis I need to know the value which covers in 99%/95% of cases. In my case the highest value which covers those cases after grouping.

Potential Solutions:

Looking at the median implementation, It seems like it would be quite easy to implement given that the values are pre-sorted, and I'm willing to implement it and create a PR.

But I'm wondering what the best way would be to implement it since it has the second-parameter percentile. Adding another 'weighted-sum' type seems like it would be quite a lot of additional items on the UI side.

Additionally you would probably want a max and a min variant depending on the underlying values & analysis.

I will probably implement a proof of concept for my own project, but if there is a preferred way to do that would help.

Source: perspective-dev/perspective