get_distribution_as_percentiles
- typhon.math.stats.get_distribution_as_percentiles(x, y, bins, ptiles=(5, 25, 5, 75, 95))[source]
get the distribution of y vs. x as percentiles.
Bin y-data according to x-data (using
typhon.math.stats.bin()
). Then, within each bin, calculate percentiles.- Parameters:
x (ndarray) – data for x-axis
y (ndarray) – data for y-axis
bins (ndarray) – Specific bins to use for dividing the x-data.
ptiles (ndarray) – Percentiles to use.