Learn R Programming

mltools (version 0.1.0)

exponential_weight: Exponential Weight

Description

Generate exponential weights

Usage

exponential_weight(k, base = exp(1), offset = 0, slope = 0.1)

Arguments

k
1-base^(offset-slope*k)
base
1-base^(offset-slope*k)
offset
1-base^(offset-slope*k)
slope
1-base^(offset-slope*k)

Details

Returns a weight based on the formula 1-base^(offset-slope*k)

Examples

Run this code
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