Function to calculate Adaptive bandwidths according to Abramson’s smoothing regimen for TNKDE with a space-time interaction.
adaptive_bw_tnkde(
grid,
events_loc,
events,
lines,
bw_net,
bw_time,
trim_bw_net,
trim_bw_time,
method,
kernel_name,
max_depth,
div,
tol,
digits,
sparse,
verbose
)
A vector with the local bandwidths, or an array if bw_time and bw_net are vectors. In that case, the array has the following dimensions : length(bw_net) X length(bw_time) X nrow(events)
A spatial grid to split the data within
A feature collection of points representing the events points
A feature collection of linestrings representing the network
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 maximum size of local bandwidths for network dimension. Must be a vector if bw_net is a vector
The maximum size of local bandwidths for time dimension. Must be a vector if bw_net is a vector
The method to use when calculating the NKDE
The name of the kernel to use
The maximum recursion depth
The divisor to use for kernels
A float indicating the spatial tolerance when snapping events on lines
The number of digits to keep
A Boolean indicating if sparse matrix should be used
A Boolean indicating if update messages should be printed
#This is an internal function, no example provided
Run the code above in your browser using DataLab