models.weighted_quantile()
The smallest y whose cumulative weight, in increasing y,
Usage
models.weighted_quantile(
y,
weights,
alpha,
)reaches alpha of the total weight.
Parameters
y: list of floatweights: list of floatalpha: float-
In
[0, 1].
Returns
float
Examples
>>> from prospicio.models import weighted_quantile
>>> weighted_quantile([3.0, 1.0, 2.0], [1.0, 1.0, 2.0], 0.5)2.0