A city water utility forecasts daily water demand, in megalitres. Its model is a linear rule on lag features, fitted earlier:
weights[0] is , the weight on lag 1 (the day just before the one being forecast), weights[1] is , and so on. bias is .
The model was tested one day ahead and looked strong. Now the pumping team wants every day of the test block forecast on the evening of the cut-off, all at once. Before anyone trusts that, score the same model both ways on the same test days:
Task: write rollout_maes(history, future, weights, bias).
history holds the real daily values up to the cut-off, oldest first. You may assume len(history) >= len(weights).future holds the real values of the test block, in order.future.Return a tuple (one_step_mae, recursive_mae), each rounded to 4 decimal places.
Same model, same days. Any gap between the two numbers comes only from where the lags came from.