Spaces:
Running
Running
Sync from GitHub (tests passed)
Browse files
deep_learning/config.py
CHANGED
|
@@ -102,7 +102,9 @@ class ASROConfig:
|
|
| 102 |
lambda_quantile: float = 0.4 # w_quantile; was 0.3 (unnormalised old formula)
|
| 103 |
# lambda_vol is a sub-weight within the calibration bundle only.
|
| 104 |
# It controls how much the Q90-Q10 spread tracks 2× actual σ.
|
| 105 |
-
|
|
|
|
|
|
|
| 106 |
risk_free_rate: float = 0.0
|
| 107 |
sharpe_window: int = 20
|
| 108 |
|
|
|
|
| 102 |
lambda_quantile: float = 0.4 # w_quantile; was 0.3 (unnormalised old formula)
|
| 103 |
# lambda_vol is a sub-weight within the calibration bundle only.
|
| 104 |
# It controls how much the Q90-Q10 spread tracks 2× actual σ.
|
| 105 |
+
# Two independent Optuna runs (20 trials each) both converged on 0.35 —
|
| 106 |
+
# updating default to match confirmed optimal value.
|
| 107 |
+
lambda_vol: float = 0.35
|
| 108 |
risk_free_rate: float = 0.0
|
| 109 |
sharpe_window: int = 20
|
| 110 |
|
deep_learning/training/hyperopt.py
CHANGED
|
@@ -50,7 +50,10 @@ def create_trial_config(trial, base_cfg: TFTASROConfig) -> TFTASROConfig:
|
|
| 50 |
dropout=trial.suggest_float("dropout", 0.1, 0.5, step=0.05),
|
| 51 |
hidden_continuous_size=trial.suggest_int("hidden_continuous_size", 8, 32, step=8),
|
| 52 |
quantiles=base_cfg.model.quantiles,
|
| 53 |
-
|
|
|
|
|
|
|
|
|
|
| 54 |
reduce_on_plateau_patience=4,
|
| 55 |
gradient_clip_val=trial.suggest_float("gradient_clip_val", 0.5, 2.0, step=0.5),
|
| 56 |
)
|
|
|
|
| 50 |
dropout=trial.suggest_float("dropout", 0.1, 0.5, step=0.05),
|
| 51 |
hidden_continuous_size=trial.suggest_int("hidden_continuous_size", 8, 32, step=8),
|
| 52 |
quantiles=base_cfg.model.quantiles,
|
| 53 |
+
# Cap at 1e-3: two consecutive Optuna runs both selected ~3-4e-3 which
|
| 54 |
+
# caused the model to converge in 1 epoch then diverge. 1e-3 is the
|
| 55 |
+
# practical upper bound for stable TFT training on ~300 samples.
|
| 56 |
+
learning_rate=trial.suggest_float("learning_rate", 5e-5, 1e-3, log=True),
|
| 57 |
reduce_on_plateau_patience=4,
|
| 58 |
gradient_clip_val=trial.suggest_float("gradient_clip_val", 0.5, 2.0, step=0.5),
|
| 59 |
)
|