Description Usage Arguments Details Examples
Generate geometric weights
1 | geometric_weight(k, n, r = 1)
|
k |
r^k/sum(r^(1, 2, ... n)) |
n |
r^k/sum(r^(1, 2, ... n)) |
r |
r^k/sum(r^(1, 2, ... n)) |
Returns a weight based on the formula r^k/sum(r^seq_len(n)). The sequence of weights for k=1, 2, ..., n sum to 1
1 2 3 | geometric_weight(1:3, n=3, r=1)
geometric_weight(1:3, n=3, r=.5)
geometric_weight(1:3, n=3, r=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.