calculate_bias: Calculate bias weights

Description Usage Arguments Value

View source: R/resampling_utils.R

Description

Calculate bias weights

Usage

1
calculate_bias(form, dat, phi.control, thr.rel, time, site_id, ptype, ...)

Arguments

form

a formula describing the learning task

dat

A data frame with time and site_id columns.

phi.control

list of parameters as returned by function UBL::phi.control

thr.rel

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

ptype

Type of spatio-temporal bias to calculate. Can include "orig", "addPhiLook", "addNoPhi"

...

Parameters to pass to sample_wts. Can include weight type (defaults to orig), alpha (defaults to 0.5), and location info (sites_sf or lat+lon+crs).

Value

Vector of bias weights


mrfoliveira/STResampling-JDSA2020 documentation built on June 28, 2021, 7:01 p.m.