Description Usage Arguments Value Author(s)
View source: R/sampling_weight.R
Calculate weights for re-sampling with a temporal bias. As time goes by past an extreme value, the weight tends to 1. While no extreme value appears, the weight stays at 0 (meaning they are less likely to be kept). More distant to previous rare value: w -> 1; very close to recent rare value / no rare values so far: w -> 0.
1 | get_phi_time_wts(df, phi, rel.thr, time, site_id)
|
df |
a data frame |
phi |
a vector of the relevance values of
|
rel.thr |
a relevance threshold above which an observation is considered relevant |
time |
the column name of the time-stamp |
site_id |
the name of the column containing location IDs |
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.