-
Notifications
You must be signed in to change notification settings - Fork 80
Conversation
🚀 Deployed on https://deploy-preview-1061--etna-docs.netlify.app |
Codecov Report
@@ Coverage Diff @@
## master #1061 +/- ##
==========================================
+ Coverage 86.15% 86.27% +0.11%
==========================================
Files 163 163
Lines 8641 8656 +15
==========================================
+ Hits 7445 7468 +23
+ Misses 1196 1188 -8
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
etna/metrics/functional_metrics.py
Outdated
@@ -116,4 +116,34 @@ def sign(y_true: ArrayLike, y_pred: ArrayLike) -> float: | |||
return np.mean(np.sign(y_true_array - y_pred_array)) | |||
|
|||
|
|||
def deviation(y_true: ArrayLike, y_pred: ArrayLike) -> float: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be max_deviation
metric, shouldn't it?
etna/metrics/metrics.py
Outdated
@@ -272,4 +273,33 @@ def greater_is_better(self) -> None: | |||
return None | |||
|
|||
|
|||
__all__ = ["MAE", "MSE", "RMSE", "R2", "MSLE", "MAPE", "SMAPE", "MedAE", "Sign"] | |||
class MaxDeviation(Metric): | |||
"""Max Deviation metric with multi-segment computation support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please add to docs explanation of metric's computation?
etna/metrics/metrics.py
Outdated
"""Max Deviation metric with multi-segment computation support. | ||
|
||
.. math:: | ||
MaxDeviation(y\_true, y\_pred) = \\max | y_j |, where \\, y_j = \\sum_{i=1}^{n}{y\_pred_i - y\_true_i} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about it, but shouldn't it be
MaxDeviation(y\_true, y\_pred) = \\max | y_j |, where \\, y_j = \\sum_{i=1}^{n}{y\_pred_i - y\_true_i} | |
MaxDeviation(y\_true, y\_pred) = \\max_{j} | y_j |, where \\, y_j = \\sum_{i=1}^{j}{y\_pred_i - y\_true_i} |
Before submitting (must do checklist)
Proposed Changes
Closing issues