MCPcopy Create free account
hub / github.com/numpy/numpy / _compute_virtual_index

Function _compute_virtual_index

numpy/lib/function_base.py:4594–4616  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

4592
4593
4594def _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
4619def _get_gamma(virtual_indexes, previous_indexes, method):

Callers 1

function_base.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected