Throughout the project, binary classification probabilities and regression
forecasts are combined using probability multiplication. The final demand
estimate for each horizon is computed as p * \hat{y}, where p is the
predicted probability of non-zero demand. This convention is implemented in
LGBMTrainer, the standalone LightGBM utilities, and the Optuna tuning
objective.
SampleWindowizer.build_lgbm_train now vectorizes target generation and
unpivoting, producing the same dataset as the previous row-wise
implementation but more efficiently.
Run baseline models with the provided configuration:
python LGHackerton/train_baseline.py --config configs/baseline.yaml --model naiveRun a grid search over PatchTST settings:
python LGHackerton/tune.py --task patchtst_grid --config configs/patchtst.yamltrain.py determines PatchTST settings using the following order:
- If
artifacts/patchtst_search.csvexists (created by the grid-search task), the combination with the lowestval_wsmapeis chosen. The associatedinput_lenis applied to window generation and to the model. - Otherwise, Optuna results from
artifacts/optuna/patchtst_best.jsonare used when available. - If neither artifact is present, default parameters from
PATCH_PARAMSare used.
This avoids confusion when both grid-search and Optuna artifacts may exist.