get_time_wts: Calculate temporally-biased re-sampling weights

Description Usage Arguments Value Author(s)

View source: R/sampling_weight.R

Description

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.

Usage

1
get_time_wts(times, phi, rel.thr)

Arguments

times

a vector of time-stamps

phi

a vector of the relevance values of df's target variable

rel.thr

a relevance threshold above which an observation is considered relevant

Value

A vector of temporally-biased re-sampling weights, scaled to fit within range [0,1].

Author(s)

Mariana Oliveira


mrfoliveira/STResampling-DSAA2019 documentation built on April 9, 2021, 5:39 a.m.