Documentation

QuantileEngine
in package

FinalYes

Table of Contents

Methods

calculate()  : float
calculateSorted()  : float
medianSorted()  : float
Median of an already-sorted, already-validated numeric array.
applyType2Averaging()  : float
calculateContinuous()  : float
calculateDiscrete()  : float
calculateInternal()  : float
calculateType2()  : float
getHyndmanFanParameters()  : array<string|int, mixed>
normalizeData()  : array<string|int, mixed>

Methods

calculate()

public static calculate(array<string|int, mixed> $data, float $probability, int $type) : float
Parameters
$data : array<string|int, mixed>
$probability : float
$type : int
Return values
float

calculateSorted()

public static calculateSorted(array<string|int, mixed> $data, float $probability, int $type) : float
Parameters
$data : array<string|int, mixed>
$probability : float
$type : int
Return values
float

medianSorted()

Median of an already-sorted, already-validated numeric array.

public static medianSorted(array<string|int, mixed> $sorted) : float

Equivalent to type 7 quantile at p=0.5. Skips validation for speed — callers must pass numeric, finite, sorted input.

Parameters
$sorted : array<string|int, mixed>
Return values
float

applyType2Averaging()

private static applyType2Averaging(float $lower, float $upper) : float
Parameters
$lower : float
$upper : float
Return values
float

calculateContinuous()

private static calculateContinuous(array<string|int, mixed> $sorted, float $p, int $type) : float
Parameters
$sorted : array<string|int, mixed>
$p : float
$type : int
Return values
float

calculateDiscrete()

private static calculateDiscrete(array<string|int, mixed> $sorted, float $p, int $type) : float
Parameters
$sorted : array<string|int, mixed>
$p : float
$type : int
Return values
float

calculateInternal()

private static calculateInternal(array<string|int, mixed> $data, float $probability, int $type, bool $alreadySorted) : float
Parameters
$data : array<string|int, mixed>
$probability : float
$type : int
$alreadySorted : bool
Return values
float

calculateType2()

private static calculateType2(array<string|int, mixed> $sorted, float $p) : float
Parameters
$sorted : array<string|int, mixed>
$p : float
Return values
float

getHyndmanFanParameters()

private static getHyndmanFanParameters(int $type) : array<string|int, mixed>
Parameters
$type : int
Return values
array<string|int, mixed>

normalizeData()

private static normalizeData(array<string|int, mixed> $data, bool $alreadySorted) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>
$alreadySorted : bool
Return values
array<string|int, mixed>

        
On this page

Search results