quantile
Classes:
Name | Description |
---|---|
QuantileMetric |
Computes quantiles over a set of observations. |
QuantileMetric
¶
Bases: CatMetric
Computes quantiles over a set of observations.
Methods:
Name | Description |
---|---|
__init__ |
Construct a |
compute |
Compute the configured quantiles over the observations. |
__init__
¶
__init__(
q: Tensor | list[Tensor] | tuple[Tensor, ...],
interpolation: Literal[
"linear", "lower", "higher", "nearest", "midpoint"
]
| str = "linear",
nan_strategy: str | float = "warn",
**kwargs: Any,
) -> None
Construct a QuantileMetric
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
Tensor | list[Tensor] | tuple[Tensor, ...]
|
The quantiles to compute. Values should be in the range [0, 1]. Should be a tensor, or a list or tuple of |
required |
|
Literal['linear', 'lower', 'higher', 'nearest', 'midpoint'] | str
|
One of:
* |
'linear'
|
|
str | float
|
One of:
* |
'warn'
|
|
Any
|
Additional arguments to pass to the base metric class. |
required |
compute
¶
Compute the configured quantiles over the observations.
Returns:
Type | Description |
---|---|
dict[float, torch.Tensor]
|
A mapping of quantiles to their corresponding value. |