Compute the floating point indexes of an array for the linear interpolation of quantiles. n : array_like The sample sizes. quantiles : array_like The quantiles values. alpha : float A constant used to correct the index computed. beta : float A
(n, quantiles, alpha: float, beta: float)
| 4592 | |
| 4593 | |
| 4594 | def _compute_virtual_index(n, quantiles, alpha: float, beta: float): |
| 4595 | """ |
| 4596 | Compute the floating point indexes of an array for the linear |
| 4597 | interpolation of quantiles. |
| 4598 | n : array_like |
| 4599 | The sample sizes. |
| 4600 | quantiles : array_like |
| 4601 | The quantiles values. |
| 4602 | alpha : float |
| 4603 | A constant used to correct the index computed. |
| 4604 | beta : float |
| 4605 | A constant used to correct the index computed. |
| 4606 | |
| 4607 | alpha and beta values depend on the chosen method |
| 4608 | (see quantile documentation) |
| 4609 | |
| 4610 | Reference: |
| 4611 | Hyndman&Fan paper "Sample Quantiles in Statistical Packages", |
| 4612 | DOI: 10.1080/00031305.1996.10473566 |
| 4613 | """ |
| 4614 | return n * quantiles + ( |
| 4615 | alpha + quantiles * (1 - alpha - beta) |
| 4616 | ) - 1 |
| 4617 | |
| 4618 | |
| 4619 | def _get_gamma(virtual_indexes, previous_indexes, method): |