View source: R/bandwidth_selection_cv_tnkde_sf.R
tnkde_worker_bw_sel | R Documentation |
Calculate for multiple network and time bandwidths the cross validation likelihood to select an appropriate bandwidth in a data-driven approach (INTERNAL)
tnkde_worker_bw_sel(
lines,
quad_events,
events_loc,
events,
w,
kernel_name,
bws_net,
bws_time,
method,
div,
digits,
tol,
sparse,
max_depth,
verbose = FALSE,
cvl = FALSE
)
lines |
A feature collection of linestrings representing the underlying network |
quad_events |
a feature collection of points indicating for which events the densities must be calculated |
events_loc |
A feature collection of points representing the location of the events |
events |
A feature collection of points representing the events. Multiple events can share the same location. They are linked by the goid column |
w |
A numeric array with the weight of the events for each pair of bandwidth |
kernel_name |
The name of the kernel to use (string) |
bws_net |
A numeric vector with the network bandwidths. Could also be an array if an adaptive bandwidth is calculated. |
bws_time |
A numeric vector with the time bandwidths. Could also be an array if an adaptive bandwidth is calculated. |
method |
The type of NKDE to use (string) |
div |
The type of divisor (not used currently) |
digits |
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 |
tol |
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. |
sparse |
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. |
max_depth |
The maximum depth of recursion |
verbose |
A boolean |
cvl |
A boolean indicating if the cvl method (TRUE) or the loo (FALSE) method must be used |
An array with the CV score for each pair of bandiwdths (rows and lines) for each event (slices)
# no example provided, this is an internal function
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.