]> Piment Noir Git Repositories - freqai-strategies.git/commit
refactor: enhance extrema weighting with sklearn scalers and new methods
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 4 Jan 2026 15:54:26 +0000 (16:54 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 4 Jan 2026 15:54:26 +0000 (16:54 +0100)
commit9172403b6a9b6b9fcd8dba4d24761721c9f19eee
tree23f668f8fa7638c5fb43877b1d464810aaced206
parentad526737071ff802f688ea2ba03dd347100b3f23
refactor: enhance extrema weighting with sklearn scalers and new methods

Replace manual standardization/normalization calculations with sklearn scalers
for better maintainability and correctness.

Standardization changes:
- Add power_yj (Yeo-Johnson) standardization method
- Replace manual zscore with StandardScaler
- Replace manual robust with RobustScaler
- Add mask size checks for all methods including MMAD
- Store fitted scaler objects instead of manual stats

Normalization changes:
- Add maxabs normalization (new default)
- Replace manual minmax with MinMaxScaler
- Fix sigmoid to output [-1, 1] range (was [0, 1])
- Replace manual calculations with MaxAbsScaler and MinMaxScaler

Other improvements:
- Remove zero-exclusion from mask (zeros are valid values)
- Fit normalization on standardized data (proper pipeline order)
- Add proper RuntimeError for unfitted scalers

Docs:
- Update README to reflect maxabs as new normalization default
- Document power_yj standardization type
- Harmonize mathematical formulas with code notation
README.md
quickadapter/user_data/strategies/ExtremaWeightingTransformer.py