Description Usage Arguments Value Author(s)
View source: R/sampling_weight.R
Calculate weights for re-sampling with a temporal bias. Most recent observations have weights that tend to 1, while the oldest observations have weights that tend to 0 (meaning they are less likely to be kept). Most recent observations: w -> 1; oldest: w -> 0.
1 | get_time_wts(times, phi, rel.thr)
|
times |
a vector of time-stamps |
phi |
a vector of the relevance values of
|
rel.thr |
a relevance threshold above which an observation is considered relevant |
A vector of temporally-biased re-sampling weights, scaled to fit within range [0,1].
Mariana Oliveira
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.