Post-training single-feature-dominance check (plan §6.4). Normalizes the raw
importance map to shares of total importance, then flags when the top feature's
share exceeds the threshold. A flagged run is suspicious (likely target
leakage) → training surfaces a plain-language warning and blocks promotion
until a human signs off.
Importances are taken as magnitudes (Math.abs) so signed coefficients (e.g.
logistic regression) are handled correctly. When all importances are zero (or
the map is empty), nothing is flagged.
The incoming threshold is passed through clampDominanceThreshold before
use. Save-time validation already rejects out-of-range values, but rows written
before that validation existed can still hold a guard-disabling value (a saved
0.95 can never flag anything), and this is the one chokepoint both callers —
the training engine and the promote gate — go through. The clamped value is what
gets reported back on Threshold, so the result reflects the bound actually applied.
Post-training single-feature-dominance check (plan §6.4). Normalizes the raw importance map to shares of total importance, then flags when the top feature's share exceeds the threshold. A flagged run is suspicious (likely target leakage) → training surfaces a plain-language warning and blocks promotion until a human signs off.
Importances are taken as magnitudes (
Math.abs) so signed coefficients (e.g. logistic regression) are handled correctly. When all importances are zero (or the map is empty), nothing is flagged.The incoming threshold is passed through clampDominanceThreshold before use. Save-time validation already rejects out-of-range values, but rows written before that validation existed can still hold a guard-disabling value (a saved
0.95can never flag anything), and this is the one chokepoint both callers — the training engine and the promote gate — go through. The clamped value is what gets reported back onThreshold, so the result reflects the bound actually applied.