powered by
Generate exponential weights
exponential_weight(k, base = exp(1), offset = 0, slope = 0.1)
1-base^(offset-slope*k)
Returns a weight based on the formula 1-base^(offset-slope*k)
exponential_weight(1:3, slope=.1) exponential_weight(1:3, slope=1) exponential_weight(1:3, slope=10)
Run the code above in your browser using DataLab