Skip to content

Commit

Permalink
Update optimize_media.py
Browse files Browse the repository at this point in the history
Added note about scaling the media_gap using the pre-training media scaler
  • Loading branch information
FribbulusXax authored Dec 4, 2024
1 parent 05defad commit df3d8d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lightweight_mmm/optimize_media.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def _objective_function(
training and prediction starts 2 months after training data finished we
need to provide the 8 weeks missing between the training data and the
prediction data so data transformations (adstock, carryover, ...) can take
place correctly.
place correctly. Must be scaled with the media scaler that was used to scale
the media data before training.
target_scaler: Scaler that was used to scale the target before training.
media_scaler: Scaler that was used to scale the media data before training.
geo_ratio: The ratio to split channel media across geo. Should sum up to 1
Expand Down Expand Up @@ -215,7 +216,8 @@ def find_optimal_budgets(
training and prediction starts 8 weeks after training data finished we
need to provide the 8 weeks missing between the training data and the
prediction data so data transformations (adstock, carryover, ...) can take
place correctly.
place correctly. Must be scaled with the media scaler that was used to scale
the media data before training.
target_scaler: Scaler that was used to scale the target before training.
media_scaler: Scaler that was used to scale the media data before training.
bounds_lower_pct: Relative percentage decrease from the mean value to
Expand Down

0 comments on commit df3d8d0

Please sign in to comment.