You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Estimates 256 equidistant quantiles on the input tensor eCDF.
379
381
@@ -393,25 +395,36 @@ def estimate_quantiles(
393
395
out : torch.Tensor
394
396
Tensor with the 256 estimated quantiles.
395
397
offset : float
396
-
The offset for the first and last quantile from 0 and 1. Default: 1/512
398
+
The offset for the first and last quantile from 0 and 1. Default: 1/(2*num_quantiles)
399
+
num_quantiles : int
400
+
The number of equally spaced quantiles.
397
401
398
402
Returns
399
403
-------
400
404
torch.Tensor:
401
405
The 256 quantiles in float32 datatype.
402
406
'''
407
+
ifA.numel() <256: raiseNotImplementedError(f'Quantile estimation needs at least 256 values in the Tensor, but Tensor had only {A.numel()} values.')
408
+
ifnum_quantiles>256: raiseNotImplementedError(f"Currently only a maximum of 256 equally spaced quantiles are supported, but the argument num_quantiles={num_quantiles}")
0 commit comments