# Path: epi_forecast_stat_mech/evaluation/sim_metrics.py
# def _helper_data_validator(data_inf, predictions):
# def _helper_construct_dataarray(ground_truth, predictions):
# def total_size_error(data_inf, predictions):
# def helper_time_percent_complete(inf, percent_complete=0.25):
# def time_percent_complete_error(data_inf, predictions, percent_complete=0.25):
# def cumulative_inf_error(data_inf, predictions, days_to_compare=14):
# def peak_size_error(data_inf, predictions):
# def peak_time_error(data_inf, predictions):


from absl.testing import absltest
from absl.testing import parameterized
from epi_forecast_stat_mech.evaluation import sim_metrics
import functools
import numpy as np
import pandas as pd
import xarray as xr
              dims=['location', 'time'],
              coords={'time': np.arange(0, 20)}),
          pred=xr.DataArray(
              data=np.ones((50, 20)),
              dims=['location', 'time'],
              coords={'time': np.arange(0, 20)}),
          expected_error=-np.ones(50)),
      dict(
          sim_metric=sim_metrics.peak_size_error,
          data=xr.DataArray(
              data=np.array([1, 2, 3, 2, 1]),
              dims=['time'],
              coords={'time': np.arange(0, 5)}),
          pred=xr.DataArray(
              data=np.ones(5),
              dims=['time'],
              coords={'time': np.arange(0, 5)}),
          expected_error=2),
      dict(
          sim_metric=sim_metrics.peak_size_error,
          data=xr.DataArray(
              data=np.array([1, 2, 3, 2, 1]),
              dims=['time'],
              coords={'time': np.arange(0, 5)}),
          pred=xr.DataArray(
              data=np.ones(2),
              dims=['time'],
              coords={'time': np.arange(3, 5)}),
          expected_error=0),
      dict(

# Path: epi_forecast_stat_mech/evaluation/sim_metrics.py
# def _helper_data_validator(data_inf, predictions):
# def _helper_construct_dataarray(ground_truth, predictions):
# def total_size_error(data_inf, predictions):
# def helper_time_percent_complete(inf, percent_complete=0.25):
# def time_percent_complete_error(data_inf, predictions, percent_complete=0.25):
# def cumulative_inf_error(data_inf, predictions, days_to_compare=14):
# def peak_size_error(data_inf, predictions):
# def peak_time_error(data_inf, predictions):


# Path: epi_forecast_stat_mech/evaluation/sim_metrics_test.py
from absl.testing import absltest
from absl.testing import parameterized
from epi_forecast_stat_mech.evaluation import sim_metrics
import functools
import numpy as np
import pandas as pd
import xarray as xr

              dims=['location', 'time'],
              coords={'time': np.arange(0, 20)}),
          pred=xr.DataArray(
              data=np.ones((50, 20)),
              dims=['location', 'time'],
              coords={'time': np.arange(0, 20)}),
          expected_error=-np.ones(50)),
      dict(
          sim_metric=sim_metrics.peak_size_error,
          data=xr.DataArray(
              data=np.array([1, 2, 3, 2, 1]),
              dims=['time'],
              coords={'time': np.arange(0, 5)}),
          pred=xr.DataArray(
              data=np.ones(5),
              dims=['time'],
              coords={'time': np.arange(0, 5)}),
          expected_error=2),
      dict(
          sim_metric=sim_metrics.peak_size_error,
          data=xr.DataArray(
              data=np.array([1, 2, 3, 2, 1]),
              dims=['time'],
              coords={'time': np.arange(0, 5)}),
          pred=xr.DataArray(
              data=np.ones(2),
              dims=['time'],
              coords={'time': np.arange(3, 5)}),
          expected_error=0),
      dict(

          sim_metric=sim_metrics.peak_size_error,