Type the time series of OrderHistory as pd.Series[int]
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m55s
All checks were successful
CI / Checks (Python 3.13) (push) Successful in 1m55s
This commit is contained in:
parent
d6b798a736
commit
081d6f7fd9
1 changed files with 4 additions and 4 deletions
|
|
@ -255,7 +255,7 @@ class OrderHistory:
|
||||||
pixel_id: int,
|
pixel_id: int,
|
||||||
predict_at: dt.datetime,
|
predict_at: dt.datetime,
|
||||||
train_horizon: int,
|
train_horizon: int,
|
||||||
) -> tuple[pd.Series, int, pd.Series]:
|
) -> tuple["pd.Series[int]", int, "pd.Series[int]"]:
|
||||||
"""Slice a horizontal time series out of the `.totals`.
|
"""Slice a horizontal time series out of the `.totals`.
|
||||||
|
|
||||||
Create a time series covering `train_horizon` weeks that can be used
|
Create a time series covering `train_horizon` weeks that can be used
|
||||||
|
|
@ -331,7 +331,7 @@ class OrderHistory:
|
||||||
pixel_id: int,
|
pixel_id: int,
|
||||||
predict_day: dt.date,
|
predict_day: dt.date,
|
||||||
train_horizon: int,
|
train_horizon: int,
|
||||||
) -> tuple[pd.Series, int, pd.Series]:
|
) -> tuple["pd.Series[int]", int, "pd.Series[int]"]:
|
||||||
"""Slice a vertical time series out of the `.totals`.
|
"""Slice a vertical time series out of the `.totals`.
|
||||||
|
|
||||||
Create a time series covering `train_horizon` weeks that can be used
|
Create a time series covering `train_horizon` weeks that can be used
|
||||||
|
|
@ -424,7 +424,7 @@ class OrderHistory:
|
||||||
pixel_id: int,
|
pixel_id: int,
|
||||||
predict_at: dt.datetime,
|
predict_at: dt.datetime,
|
||||||
train_horizon: int,
|
train_horizon: int,
|
||||||
) -> tuple[pd.Series, int, pd.Series]:
|
) -> tuple["pd.Series[int]", int, "pd.Series[int]"]:
|
||||||
"""Slice a vertical real-time time series out of the `.totals`.
|
"""Slice a vertical real-time time series out of the `.totals`.
|
||||||
|
|
||||||
Create a time series covering `train_horizon` weeks that can be used
|
Create a time series covering `train_horizon` weeks that can be used
|
||||||
|
|
@ -557,7 +557,7 @@ class OrderHistory:
|
||||||
# `+1` as both `first_day` and `last_day` are included.
|
# `+1` as both `first_day` and `last_day` are included.
|
||||||
n_days: int = (last_day - first_day).days + 1
|
n_days: int = (last_day - first_day).days + 1
|
||||||
|
|
||||||
return round(float(training_ts.sum()) / n_days, 1)
|
return round(training_ts.sum() / n_days, 1)
|
||||||
|
|
||||||
def choose_tactical_model(
|
def choose_tactical_model(
|
||||||
self,
|
self,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue