Add tune_lgbm() and wire hyperparameter tuning into DAG

Converts scratch/tune_model.R into a pure tune_lgbm() function,
replacing hardcoded winning_params with a fully automated tar_target.
Best params (trees=844, depth=3, lr=0.0204, min_n=389) now flow
reproducibly into evaluate_final_model() and train_production_model().
PR-AUC improved from 0.165 to 0.198.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-22 03:25:35 -05:00
parent 33d0fc31c7
commit f47b2e1be2
7 changed files with 178 additions and 9 deletions

View File

@@ -307,12 +307,7 @@ list(
),
tar_target(
winning_params,
list(
trees = 844,
tree_depth = 3,
learn_rate = 0.0204,
min_n = 389
)
tune_lgbm(imbalance_windows)
),
tar_target(
production_model_uri,