mindspore/docs/api/api_python/ops/mindspore.ops.Quantile.rst

21 lines
1.0 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.Quantile
======================
.. py:class:: mindspore.ops.Quantile(dim=None, keep_dims=False, ignore_nan=False)
计算 `input` 中所有元素的第 `q` 分位数,如果第 `q` 分位数位于两个数据点之间,则返回使用线性插值计算结果。
更多参考详见 :func:`mindspore.ops.quantile`:func:`mindspore.ops.nanquantile`
参数:
- **dim** (int可选) - 要减少的维度。默认情况下 `dim` 为None导致输入Tensor在计算前被展平。默认值 ``None``
- **keep_dims** (bool可选) - 输出Tensor是否保留维度。默认值 ``False``
- **ignore_nan** (bool可选) - 是否忽略输入中的NaN值。默认值 ``False``
输入:
- **input** (Tensor) - 输入Tensor。支持的数据类型为float32、float64。
- **q** (Union[float, Tensor]) - 标量或1D Tensor。其值范围在[0, 1]支持的数据类型为float32、float64。
输出:
输出Tensor数据类型与 `input` 一致。