From d6a0c34bd6a0409853e7e6784578fce609152989 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 20 Jul 2026 23:31:57 +0200 Subject: [PATCH] chore(quickadapter): raise default fill_sigma_candles to 25.0 Update the canonical DEFAULTS_LABEL_WEIGHTING value, the config template, and the tunables documentation in lockstep. The default is inert for the default fill_method ("zero"); it only affects the per-pivot Gaussian bandwidth (and its knn clip upper bound) when fill_method is "gaussian" or "epsilon_gaussian". --- README.md | 2 +- quickadapter/user_data/config-template.json | 2 +- quickadapter/user_data/strategies/LabelTransformer.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9b823ea..e8a5d0a 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ docker compose up -d --build | freqai.label_weighting.fill_method | `zero` | enum {`zero`,`epsilon`,`gaussian`,`epsilon_gaussian`} | Off-pivot weighting scheme. `zero` hard-zeros off-pivot rows; `epsilon` applies the epsilon floor `fill_epsilon * (pivot_weights)`; `gaussian` applies per-pivot Gaussian bumps; `epsilon_gaussian` sums the `epsilon` floor and the `gaussian` bumps. Pivot rows take the max of their raw weight and the off-pivot field at their index (no-op for `zero`). Switching away from `zero` may require retuning tree-leaf regularization (`min_child_weight`, `lambda`) and resetting any prior Optuna study. Changing this parameter requires deleting trained models. | | freqai.label_weighting.fill_epsilon | 0.000001 | float [0,1] | Off-pivot fraction of the pivot baseline. Ignored when `fill_method` not in {`epsilon`,`epsilon_gaussian`}. | | freqai.label_weighting.fill_epsilon_baseline | `mean` | enum {`mean`,`median`} | Pivot baseline statistic. `mean` tracks central tendency; `median` is robust against pivot-weight skew. Ignored when `fill_method` not in {`epsilon`,`epsilon_gaussian`}. | -| freqai.label_weighting.fill_sigma_candles | 10.0 | float >= 0.5 | Gaussian standard deviation in candles for the per-pivot bumps. Acts as the upper bound on per-pivot sigma when `fill_bandwidth == "knn"`. Lower bound 0.5 prevents severe underflow in the Gaussian tail. Ignored when `fill_method` not in {`gaussian`,`epsilon_gaussian`}. | +| freqai.label_weighting.fill_sigma_candles | 25.0 | float >= 0.5 | Gaussian standard deviation in candles for the per-pivot bumps. Acts as the upper bound on per-pivot sigma when `fill_bandwidth == "knn"`. Lower bound 0.5 prevents severe underflow in the Gaussian tail. Ignored when `fill_method` not in {`gaussian`,`epsilon_gaussian`}. | | freqai.label_weighting.fill_sigma_min_candles | 0.5 | float >= 0.5 | Lower bound on per-pivot sigma in candles when `fill_bandwidth == "knn"`. Clipped to `fill_sigma_candles` when larger. Ignored when `fill_method` not in {`gaussian`,`epsilon_gaussian`} or `fill_bandwidth != "knn"`. | | freqai.label_weighting.fill_bandwidth | `fixed` | enum {`fixed`,`knn`} | Per-pivot Gaussian bandwidth selector. `fixed` applies a constant `fill_sigma_candles` to every pivot (legacy behavior). `knn` adapts each pivot's sigma to local pivot density via `sigma_p = clip(fill_bandwidth_alpha * d_k(p), fill_sigma_min_candles, fill_sigma_candles)` where `d_k(p)` is the index distance to the `k`-th nearest pivot neighbor (Loftsgaarden & Quesenberry 1965; Silverman 1986, §5.2). Mitigates the crushing of weaker pivots by stronger neighbors in dense clusters. Ignored when `fill_method` not in {`gaussian`,`epsilon_gaussian`}. | | freqai.label_weighting.fill_bandwidth_neighbors | 1 | int >= 1 | `k` for the k-nearest-neighbor bandwidth selector. Ignored when `fill_method` not in {`gaussian`,`epsilon_gaussian`} or `fill_bandwidth != "knn"`. | diff --git a/quickadapter/user_data/config-template.json b/quickadapter/user_data/config-template.json index c80f480..bdfa2e6 100644 --- a/quickadapter/user_data/config-template.json +++ b/quickadapter/user_data/config-template.json @@ -102,7 +102,7 @@ "fill_method": "zero", "fill_epsilon": 0.000001, "fill_epsilon_baseline": "mean", - "fill_sigma_candles": 10.0, + "fill_sigma_candles": 25.0, "fill_sigma_min_candles": 0.5, "fill_bandwidth_alpha": 0.5, "support_policy": "fallback", diff --git a/quickadapter/user_data/strategies/LabelTransformer.py b/quickadapter/user_data/strategies/LabelTransformer.py index aec380f..ca8f46f 100644 --- a/quickadapter/user_data/strategies/LabelTransformer.py +++ b/quickadapter/user_data/strategies/LabelTransformer.py @@ -127,7 +127,7 @@ DEFAULTS_LABEL_WEIGHTING: Final[dict[str, Any]] = { "fill_method": FILL_METHODS[0], # "zero" "fill_epsilon": 1e-6, "fill_epsilon_baseline": FILL_EPSILON_BASELINES[0], # "mean" - "fill_sigma_candles": 10.0, + "fill_sigma_candles": 25.0, "fill_sigma_min_candles": 0.5, "fill_bandwidth": FILL_BANDWIDTHS[0], # "fixed" "fill_bandwidth_neighbors": 1, -- 2.53.0