- ott.tools.soft_sort.quantile_normalization(inputs, targets, weights=None, axis=-1, **kwargs)#
Re-normalize inputs so that its quantiles match those of targets/weights.
Quantile normalization rearranges the values in inputs to values that match the distribution of values described in the discrete distribution
weights. This transformation preserves the order of values in
inputsalong the specified
Array) – array of any shape whose values will be changed to match those in
Array) – sorted array (in ascending order) of dimension 1 describing a discrete distribution. Note: the
targetsvalues must be provided as a sorted vector.
int) – the axis along which the quantile transformation is applied.
Any) – keyword arguments passed on to lower level functions. Of interest to the user are
squashing_fun, which will redistribute the values in
inputsto lie in \([0,1]\) (sigmoid of whitened values by default) to solve the optimal transport problem;
PointCloud, which defines the ground 1D cost function to transport from
epsilonregularization parameter. Remaining
kwargsare passed on to parameterize the
- Return type:
An array, which has the same shape as the input, except on the give axis on which the dimension is 1.
A ValueError in case the weights and the targets are both set and not of –
compatible shapes. –