Add extrapolate_season.predict() function

- the function implements a forecasting "method" similar to the
  seasonal naive method
  => instead of simply taking the last observation given a seasonal lag,
     it linearly extrapolates all observations of the same seasonal lag
     from the past into the future; conceptually, it is like the
     seasonal naive method with built-in smoothing
- the function is tested just like the `arima.predict()` and
  `ets.predict()` functions
  + rename the `tests.forecasts.methods.test_ts_methods` module
    into `tests.forecasts.methods.test_predictions`
- re-organize some constants in the `tests` package
- streamline some docstrings
This commit is contained in:
Alexander Hess 2021-02-01 11:32:10 +01:00
commit b8952213d8
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
9 changed files with 170 additions and 43 deletions

View file

@ -47,7 +47,10 @@ def order_totals(good_pixel_id):
@pytest.fixture
def order_history(order_totals, grid):
"""An `OrderHistory` object that does not need the database."""
"""An `OrderHistory` object that does not need the database.
Uses the LONG_TIME_STEP as the length of a time step.
"""
oh = timify.OrderHistory(grid=grid, time_step=test_config.LONG_TIME_STEP)
oh._data = order_totals