atoti.array.quantile_index(Return a measure equal to the index of requested quantile of the elements of the passed array measure.
measure: VariableMeasureConvertible,
/,
q: _Quantile,
*,
mode: Literal[‘simple’, ‘centered’, ‘inc’, ‘exc’] ='inc',
interpolation: Literal[‘higher’, ‘lower’, ‘nearest’] ='lower',
) → MeasureDefinition
Parameters
measure
The measure to get the quantile of.q
The quantile to take. For instance,0.95 is the 95th percentile and 0.5 is the median.
mode
The method used to calculate the index of the quantile. Available options are, when searching for the q quantile of a vectorX:
simple:len(X) * qcentered:len(X) * q + 0.5exc:(len(X) + 1) * qinc:(len(X) - 1) * q + 1
interpolation
If the quantile index is not an integer, the interpolation decides what value is returned. The different options are, considering a quantile indexk with i < k < j for the original vector X
and the sorted vector Y:
lowest: the index inXofY[i]highest: the index inXofY[j]nearest: the index inXofY[i]orY[j]depending on which ofiorjis closest tok