mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Update docs for quantile to be clearer for nearest (#162423)
Correct the rounding scheme for nearest in quantile. Pull Request resolved: https://github.com/pytorch/pytorch/pull/162423 Approved by: https://github.com/soulitzer
This commit is contained in:
committed by
PyTorch MergeBot
parent
e1be887870
commit
0ec723acd0
@ -7132,7 +7132,7 @@ indices ``i`` and ``j`` in the sorted order, result is computed according to the
|
||||
- ``linear``: ``a + (b - a) * fraction``, where ``fraction`` is the fractional part of the computed quantile index.
|
||||
- ``lower``: ``a``.
|
||||
- ``higher``: ``b``.
|
||||
- ``nearest``: ``a`` or ``b``, whichever's index is closer to the computed quantile index (rounding down for .5 fractions).
|
||||
- ``nearest``: ``a`` or ``b``, whichever's index is closer to the computed quantile index (follows :func:`torch.round`).
|
||||
- ``midpoint``: ``(a + b) / 2``.
|
||||
|
||||
If :attr:`q` is a 1D tensor, the first dimension of the output represents the quantiles and has size
|
||||
|
Reference in New Issue
Block a user