]> Piment Noir Git Repositories - freqai-strategies.git/commitdiff
docs(quickadapter): document sample_weighting tunables
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 24 May 2026 23:26:21 +0000 (01:26 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 24 May 2026 23:26:21 +0000 (01:26 +0200)
README.md

index 90d4a872ea1a50f14c2fc09291e8b38d3992b1a3..54e81fceafcc23d83fa2b62593e81523abb5b5cf 100644 (file)
--- a/README.md
+++ b/README.md
@@ -79,6 +79,9 @@ docker compose up -d --build
 | freqai.label_weighting.metric_coefficients                     | {}                            | dict[str, float]                                                                                                                             | Per-metric coefficients for `combined` strategy. Keys: `amplitude`, `amplitude_threshold_ratio`, `volume_rate`, `speed`, `efficiency_ratio`, `volume_weighted_efficiency_ratio`.                                                                                                                                                                                                                                                                                                   |
 | freqai.label_weighting.aggregation                             | `arithmetic_mean`             | enum {`arithmetic_mean`,`geometric_mean`,`harmonic_mean`,`quadratic_mean`,`weighted_median`,`softmax`}                                       | Metric aggregation method for `combined` strategy. `arithmetic_mean`=(Σ(w·m)/Σ(w)), `geometric_mean`=(∏(m^w))^(1/Σw), `harmonic_mean`=Σ(w)/(Σ(w/m)), `quadratic_mean`=(Σ(w·m²)/Σ(w))^(1/2), `weighted_median`=Q₀.₅(m,w), `softmax`=Σ(m·s_i) where s_i=w_i·exp(m_i/T)/Σ(w_j·exp(m_j/T)).                                                                                                                                                                                            |
 | freqai.label_weighting.softmax_temperature                     | 1.0                           | float > 0                                                                                                                                    | Temperature T for `softmax` aggregation, controls distribution sharpness.                                                                                                                                                                                                                                                                                                                                                                                                          |
+| _Sample weighting_                                             |                               |                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
+| freqai.sample_weighting.aggregation                            | `arithmetic_mean`             | enum {`arithmetic_mean`,`geometric_mean`,`harmonic_mean`,`quadratic_mean`,`weighted_median`,`softmax`}                                       | Row-wise aggregation of per-label weights produced by `label_weighting`. The aggregated vector is multiplied with freqtrade's recency weights, renormalized to mean=1, and passed to `model.fit(sample_weight=...)`. No-op when a single label is configured.                                                                                                                                                                                                                      |
+| freqai.sample_weighting.softmax_temperature                    | 1.0                           | float > 0                                                                                                                                    | Temperature T for `softmax` aggregation, controls distribution sharpness.                                                                                                                                                                                                                                                                                                                                                                                                          |
 | _Label pipeline_                                               |                               |                                                                                                                                              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
 | freqai.label_pipeline.standardization                          | `none`                        | enum {`none`,`zscore`,`robust`,`mmad`,`power_yj`}                                                                                            | Standardization method applied to labels before normalization. `none`=w, `zscore`=(w-μ)/σ, `robust`=(w-median)/(Q₃-Q₁), `mmad`=(w-median)/(MAD·k), `power_yj`=YJ(w).                                                                                                                                                                                                                                                                                                               |
 | freqai.label_pipeline.robust_quantiles                         | [0.25, 0.75]                  | list[float] where 0 <= Q1 < Q3 <= 1                                                                                                          | Quantile range for robust standardization, Q1 and Q3.                                                                                                                                                                                                                                                                                                                                                                                                                              |