| weight_decay | R Documentation |
Compute a vector of weights with a decay rate.
weight_decay(vector, decay)
vector |
Vector of sequence. |
decay |
Decay factor for computing weights. A smaller decay value would give greater weight to the former items than to the latter items. The i-th item has raw weight = decay ^ i.
|
Normalized weights (i.e., sum of weights = 1).
FMAT_run()
# "individualism"
weight_decay(c("individual", "##ism"), 0.5)
weight_decay(c("individual", "##ism"), 0.8)
weight_decay(c("individual", "##ism"), 1)
weight_decay(c("individual", "##ism"), 2)
# "East Asian people"
weight_decay(c("East", "Asian", "people"), 0.5)
weight_decay(c("East", "Asian", "people"), 0.8)
weight_decay(c("East", "Asian", "people"), 1)
weight_decay(c("East", "Asian", "people"), 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.