Qu

quantile_normalize

Builtin index · Statistics & ML

result = quantile_normalize(X)

Input: X · Output: result

What it is

Rank-based scaling of X (vector, matrix column-wise, or table per numeric column): each value is replaced by its rank against its own column, rescaled uniform onto [0, 1].

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
result = quantile_normalize(X)
X vector or matrixnot documented yet
result —
Returns a value the same shape as X; tied input values land on the same output rank.

Examples

From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.

print("quantile_normalize: {round(quantile_normalize(raw), 3)}")
output
quantile_normalize: [0, 0.143, 0.143, 0.143, 0.571, 0.571, 0.857, 1]

from statistics-ml

How it works

quantile_normalize(X) — each value replaced by its empirical-CDF rank against its own column, target distribution uniform on [0, 1] (sklearn QuantileTransformer's simpler, no-inverse-erf-needed option — see scaler::ColumnParams:: Quantile's doc comment for why).

From the note above this builtin in the interpreter, where the reasoning was written down as it was built.