improve model training
This commit is contained in:
@@ -27,6 +27,7 @@ python scripts/train_rain_model.py \
|
||||
--tune-hyperparameters \
|
||||
--max-hyperparam-trials 12 \
|
||||
--calibration-methods "none,sigmoid,isotonic" \
|
||||
--threshold-policy "walk_forward" \
|
||||
--walk-forward-folds 4 \
|
||||
--model-version "rain-auto-v1-extended" \
|
||||
--out "models/rain_model.pkl" \
|
||||
@@ -40,6 +41,7 @@ Review in report:
|
||||
- `candidate_models[*].calibration_comparison`
|
||||
- `naive_baselines_test`
|
||||
- `sliced_performance_test`
|
||||
- `threshold_tuning_walk_forward`
|
||||
- `walk_forward_backtest`
|
||||
|
||||
## 3) Deploy
|
||||
@@ -133,6 +135,7 @@ The script exits non-zero on failure, so it can directly drive alerting.
|
||||
- `RAIN_TUNE_HYPERPARAMETERS`
|
||||
- `RAIN_MAX_HYPERPARAM_TRIALS`
|
||||
- `RAIN_CALIBRATION_METHODS`
|
||||
- `RAIN_THRESHOLD_POLICY`
|
||||
- `RAIN_WALK_FORWARD_FOLDS`
|
||||
- `RAIN_ALLOW_EMPTY_DATA`
|
||||
- `RAIN_MODEL_BACKUP_PATH`
|
||||
@@ -141,3 +144,15 @@ The script exits non-zero on failure, so it can directly drive alerting.
|
||||
Recommended production defaults:
|
||||
- Enable tuning daily or weekly (`RAIN_TUNE_HYPERPARAMETERS=true`)
|
||||
- Keep walk-forward folds `0` in continuous mode, run fold backtests in scheduled evaluation jobs
|
||||
|
||||
## 8) Auto-Recommend Candidate
|
||||
|
||||
To compare saved training reports and pick a deployment candidate automatically:
|
||||
|
||||
```sh
|
||||
python scripts/recommend_rain_model.py \
|
||||
--reports-glob "models/rain_model_report*.json" \
|
||||
--require-walk-forward \
|
||||
--top-k 5 \
|
||||
--json-out "models/rain_model_recommendation.json"
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user