RankGaussian#

class sdm.processing.numerical.RankGaussian(*, max_knots: int | None = None)#

Bases: Processor

Map interpolated empirical mid-ranks to standard normal quantiles.

Each fitted value receives probability (L + R) / (2 * N), where L and R count finite fitted values strictly below and at or below it, and N is the number of finite fitted values. Ties share a rank. Query probabilities interpolate between retained fitted value-rank pairs and clamp to the endpoint probabilities.

When max_knots is set, each column retains at most that many pairs, selected at evenly spaced normal quantiles between the fitted extremes.

NaN and infinite values are ignored during fitting. NaNs are preserved during transformation. Constant columns map to zero; columns without finite fitted values produce NaNs.

Parameters:

max_knots (int | None) – Maximum number of knots per column, at least 2. If None, retain all fitted values.

Capabilities#

Handled Semantic Types

numerical

Requires Fitting

✅