Add OrderHistory.avg_daily_demand()

- the method calculates the number of daily `Order`s in a `Pixel`
  withing the `train_horizon` preceding the `predict_day`
This commit is contained in:
Alexander Hess 2021-02-01 21:48:28 +01:00
commit cb7611d587
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
4 changed files with 83 additions and 11 deletions

View file

@ -1,6 +1,5 @@
"""Tests for the `urban_meal_delivery.forecasts.models` sub-package."""
import datetime as dt
import pandas as pd
import pytest
@ -59,16 +58,6 @@ class TestGenericForecastingModelProperties:
self.unique_model_names.add(model.name)
@pytest.fixture
def predict_at(self) -> dt.datetime:
"""`NOON` on the day to be predicted."""
return dt.datetime(
test_config.END.year,
test_config.END.month,
test_config.END.day,
test_config.NOON,
)
@pytest.mark.r
def test_make_prediction_structure(
self, model_cls, order_history, pixel, predict_at,