R/adaptive_simultaneous_tnkde_bw.R
worker_adaptive_bw_tnkde.Rd
The worker function to calculate Adaptive bandwidths according to Abramson’s smoothing regimen for TNKDE with a space-time interaction (INTERNAL).
worker_adaptive_bw_tnkde(
lines,
quad_events,
events_loc,
events,
w,
kernel_name,
bw_net,
bw_time,
method,
div,
digits,
tol,
sparse,
max_depth,
verbose = FALSE
)
A feature collection of linestrings representing the underlying network
a feature collection of points indicating for which events the densities must be calculated
A feature collection of points representing the location of the events
A feature collection of points representing the events. Multiple events can share the same location. They are linked by the goid column
A numeric vector with the weight of the events
The name of the kernel to use (string)
The fixed kernel bandwidth for the network dimension. Can also be a vector if several bandwidth must be used.
The fixed kernel bandwidth for the time dimension. Can also be a vector if several bandwidth must be used.
The type of NKDE to use (string)
The divisor to use for the kernel. Must be "n" (the number of events within the radius around each sampling point), "bw" (the bandwidth) "none" (the simple sum).
The number of digits to retain from the spatial coordinates. It ensures that topology is good when building the network. Default is 3. Too high a precision (high number of digits) might break some connections
A float indicating the minimum distance between the events and the lines' extremities when adding the point to the network. When points are closer, they are added at the extremity of the lines.
A Boolean indicating if sparse or regular matrices should be used by the Rcpp functions. These matrices are used to store edge indices between two nodes in a graph. Regular matrices are faster, but require more memory, in particular with multiprocessing. Sparse matrices are slower (a bit), but require much less memory.
An integer, the maximum depth to reach for continuous and discontinuous NKDE
A Boolean, indicating if the function should print messages about the process.
A vector with the local bandwidths or an array if bw_net and bw_time are vectors
#This is an internal function, no example provided