perc_ema

Contents

perc_ema#

hybrid_aif.train.perc_ema(state, x, perclo, perchi, decay, cap)[source]#

Percentile-EMA return normalization: (new state, offset, invscale).

state is the (low, high) pair of percentile EMAs, updated from this batch’s returns before use. invscale = max(1/cap, high − low), so a small spread is never amplified.