Estimates 256 equidistant quantiles on the input tensor eCDF.
Estimates 256 equidistant quantiles on the input tensor eCDF.
...
@@ -344,25 +393,36 @@ def estimate_quantiles(
...
@@ -344,25 +393,36 @@ def estimate_quantiles(
out : torch.Tensor
out : torch.Tensor
Tensor with the 256 estimated quantiles.
Tensor with the 256 estimated quantiles.
offset : float
offset : float
The offset for the first and last quantile from 0 and 1. Default: 1/512
The offset for the first and last quantile from 0 and 1. Default: 1/(2*num_quantiles)
num_quantiles : int
The number of equally spaced quantiles.
Returns
Returns
-------
-------
torch.Tensor:
torch.Tensor:
The 256 quantiles in float32 datatype.
The 256 quantiles in float32 datatype.
'''
'''
ifA.numel()<256:raiseNotImplementedError(f'Quantile estimation needs at least 256 values in the Tensor, but Tensor had only {A.numel()} values.')
ifnum_quantiles>256:raiseNotImplementedError(f"Currently only a maximum of 256 equally spaced quantiles are supported, but the argument num_quantiles={num_quantiles}")