- ott.tools.soft_sort.quantile_normalization(inputs, targets, weights=None, axis=- 1, **kwargs)#
Renormalize inputs so that its quantiles match those of targets/weights.
The idea of quantile normalization is to map the inputs to values so that the distribution of transformed values matches the distribution of target values. In a sense, we want to keep the inputs in the same order, but apply the values of the target.
ndarray) – the inputs array of any shape.
ndarray) – the target values of dimension 1. The targets must be sorted.
int) – the axis along which to apply the transformation on the inputs.
kwargs – 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;
cost_fn, used in
PointCloud, that defines the ground cost function to transport from
num_targetstarget values (squared Euclidean distance by default, see
pointcloud.pyfor more details);
epsilonvalues as well as other parameters to shape the
- Return type
A jnp.ndarray, 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. –