for binomial decay, where \(W\) is window_size. If normalize is True,
each weight is divided by \(\sum_{l'} w(l'; \alpha)\) so that the
weights sum to one.
This function always broadcasts the lag dimension (l_range) to the
trailing axis of the output tensor.
Args
alpha
The parameter for the adstock decay function.
l_range
A 1D tensor representing the lag range, e.g., [w-1, w-2, ..., 0].
window_size
The number of time periods that go into the adstock weighted
average for each output time period.
decay_functions
String or sequence of strings indicating the decay
function(s) to use for the Adstock calculation. Allowed values are
'geometric' and 'binomial'.
normalize
A boolean indicating whether to normalize the weights. Default:
True.
Returns
A tensor of weights with a shape of (*alpha.shape, len(l_range)).
Raises
ValueError
If the shape of decay_functions is not broadcastable to
the shape of alpha.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-11-05 UTC."],[],[]]