-
Notifications
You must be signed in to change notification settings - Fork 0
(Modelling) Main Feature Engineering function #19
Copy link
Copy link
Open
Description
Orchestrator Function build_features_for_range
Objective:
Create an orchestrator function that chains existing feature engineering functions to produce a complete feature DataFrame for a specified date range.
Function Signature:
def build_features_for_range(
base_df: pd.DataFrame,
start_date: str,
end_date: str,
lags=(7,14,28,365),
roll_lags=(7,14,28),
roll_windows=(7,14),
roll_stats=("mean", "std")
) -> pd.DataFrame
if you want you can use this ready Helper function:
def required_lookback_days(lags, roll_lags, roll_windows):
a = max(lags) if lags else 0
b = max((rl + w - 1 for rl in roll_lags for w in roll_windows), default=0)
return max(a, b)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels