etna icon indicating copy to clipboard operation
etna copied to clipboard

[Draft]Create `AsymmetricMetric`

Open alex-hse-repository opened this issue 2 years ago • 0 comments

🚀 Feature Request

Create metric, which use the custom penalty for over- and under- forecasting. This might be useful when the over- and under- forecasting is harmful differently.

Proposal

  • In file metrics/metric.py create class:
class AsymmetricMetric(Metric)
  • Constructor should have the following interface:
def __init__(
    self,
    mode: str = MetricAggregationMode.per_segment,
    asymmetric_threshold: float=0.0,
    under_estimation_penalty:  Callable[[ArrayLike, ArrayLike], float],
    over_estimation_penalty: Callable[[ArrayLike, ArrayLike], float],
   **kwargs
):

Test cases

No response

Additional context

No response

alex-hse-repository avatar Aug 03 '22 10:08 alex-hse-repository