Compute the quantile or percentile of an array.
Numeric.stat.quantile(values, chance, percent = false, ignore = false, level)Finds the requested quantile of the sorted entries.
- Parameters:
values: Vector or matrix of input valueschance: Quantile position between zero and onepercent: When true reads the probability as a percentageignore: Whether invalid entries are skippedlevel: Optional axis along which to compute quantiles
- Returns: Quantile matching the requested probability
- NumPy: Covers
np.quantile,np.nanquantile,np.percentile,np.nanpercentilethrough a single Numerix method.
import Numeric from '@neabyte/numerix'
const value = Numeric.stat.quantile([1, 2, 3, 4], 0.5)
console.log(value)
// 2.5import Numeric from '@neabyte/numerix'
const value = Numeric.stat.quantile([1, 2, 3, 4], 50, true)
console.log(value)
// 2.5import Numeric from '@neabyte/numerix'
const value = Numeric.stat.quantile([1, 2, 3, 4], 0)
console.log(value)
// 1import Numeric from '@neabyte/numerix'
const value = Numeric.stat.quantile([1, 2, 3, 4], 1)
console.log(value)
// 4