tnkde_get_loo_values2: The exposed function to calculate TNKDE likelihood cv

View source: R/RcppExports.R

tnkde_get_loo_values2R Documentation

The exposed function to calculate TNKDE likelihood cv

Description

The exposed function to calculate TNKDE likelihood cv (INTERNAL) when an adaptive bandwidth is used

Usage

tnkde_get_loo_values2(
  method,
  neighbour_list,
  sel_events,
  sel_events_wid,
  sel_events_time,
  events,
  events_wid,
  events_time,
  weights,
  bws_net,
  bws_time,
  kernel_name,
  line_list,
  max_depth,
  min_tol
)

Arguments

method

a string, one of "simple", "continuous", "discontinuous"

neighbour_list

a List, giving for each node an IntegerVector with its neighbours

sel_events

a Numeric vector indicating the selected events (id of nodes)

sel_events_wid

a Numeric Vector indicating the unique if of the selected events

sel_events_time

a Numeric Vector indicating the time of the selected events

events

a NumericVector indicating the nodes in the graph being events

events_wid

a NumericVector indicating the unique id of all the events

events_time

a NumericVector indicating the timestamp of each event

weights

a cube with the weights associated with each event for each bws_net and bws_time.

bws_net

an arma::cube of three dimensions with the network bandwidths calculated for each observation for each global time and network bandwidths

bws_time

an arma::cube of three dimensions with the time bandwidths calculated for each observation for each global time and network bandwidths

kernel_name

a string with the name of the kernel to use

line_list

a DataFrame describing the lines

max_depth

the maximum recursion depth

min_tol

a double indicating by how much 0 in density values must be replaced

Value

a matrix with the CV score for each pair of global bandiwdths

Examples

# no example provided, this is an internal function

JeremyGelb/spNetwork documentation built on May 24, 2024, 7:23 p.m.