Skip to content

NormalScore

Normal-score transform through the (weighted) empirical CDF, or through a smooth reference distribution.

Parameters:

Name Type Description Default
tails (float, float)

Values at cumulative probability 0 and 1. Beyond the data, values interpolate in probability toward them; they default to the data range, or to the bounds of the reference.

required
reference KernelDensity or GaussianMixture

A fitted one-variable distribution to take the scores against, in place of the data: its quantiles at scores -5 to 5 form the table, so few or clustered data still get smooth tails. Fit the reference with the declustering weights; fit then takes no weights.

required

table_ property

table_

Transformation table: sorted values and their scores.

fit method descriptor

fit(
    values,
    *,
    weights=None,
    censored=None,
    seed=0,
    data=None,
)

Fits the empirical (or reference) distribution.

Parameters:

Name Type Description Default
values array_like or str

Sample values, in the units to transform, or their column in data.

required
weights array_like or str

Declustering weights; refused together with reference, whose own fit takes them instead.

None
censored array_like of bool or str

Marks values reported at their detection limit rather than measured exactly (those cells still hold the limit as their numeric value). Values keep their exact rank against every uncensored value and against censored values at another limit; censored values tied at the same limit have no true order between them, so each such tie is shuffled with seed before scoring instead of averaged into one repeated score. Refused together with reference.

None
seed int

Seed for breaking ties among censored values at the same limit.

0
data (PointSet, Drillholes, BlockModel, Table or mapping)

Holds the columns named by the other arguments.

None

fit_transform method descriptor

fit_transform(
    values,
    *,
    weights=None,
    censored=None,
    seed=0,
    data=None,
)

Scores of the fitted values, exact per rank.

from_json staticmethod

from_json(text)

Reads to_json output; raises InvalidInput on another class's JSON or a newer format.

to_json method descriptor

to_json()

JSON of the parameters and, once fitted, the fitted state.

used in