tinkoff-ai / etna

ETNA – Time-Series Library
https://etna.tinkoff.ru
Apache License 2.0
856 stars 81 forks source link

Vectorize metric computation #1345

Closed Mr-Geekman closed 1 year ago

Mr-Geekman commented 1 year ago

🚀 Feature Request

Currently our metrics are calculated in per-segment fashion. We could fix it to optimize metric computation speed.

Proposal

Add new parameter to Metric: metric_fn_signature. It could have two possible values:

Rework functional metrics to work with new matrix mode by checking the input shape:

Rework all current metrics (except for interval metrics) to work in matrix mode. For metrics based on sklearn we should use multioutput parameter.

To discuss:

Test cases

Additional context

Related: #1338.