utils¶
Functions
|
Aggregate metrics in |
|
Compute metrics for given y_true, y_pred. |
|
Percentile for pandas agg. |
- aggregate_metrics_df(metrics_df: pandas.core.frame.DataFrame) Dict[str, float] [source]¶
Aggregate metrics in
log_backtest_metrics()
method.- Parameters
metrics_df (pandas.core.frame.DataFrame) – Dataframe produced with
etna.pipeline.Pipeline._get_backtest_metrics()
- Return type
Dict[str, float]
- compute_metrics(metrics: List[etna.metrics.base.Metric], y_true: etna.datasets.tsdataset.TSDataset, y_pred: etna.datasets.tsdataset.TSDataset) Dict[str, Union[float, Dict[str, float]]] [source]¶
Compute metrics for given y_true, y_pred.
- Parameters
metrics (List[etna.metrics.base.Metric]) – list of metrics to compute
y_true (etna.datasets.tsdataset.TSDataset) – dataset of true values of time series
y_pred (etna.datasets.tsdataset.TSDataset) – dataset of time series forecast
- Returns
dict of metrics in format {“metric_name”: metric_value}
- Return type
Dict[str, Union[float, Dict[str, float]]]