Cross-adjacency matrix with feature weighting
Source:R/spatial_weights.R
cross_weighted_spatial_adjacency.RdCross-adjacency matrix with feature weighting
Usage
cross_weighted_spatial_adjacency(
coord_mat1,
coord_mat2,
feature_mat1,
feature_mat2,
wsigma = 0.73,
alpha = 0.5,
nnk = 27,
maxk = nnk,
weight_mode = c("binary", "heat"),
sigma = 1,
dthresh = sigma * 2.5,
normalized = TRUE
)Arguments
- coord_mat1
the first coordinate matrix (the query)
- coord_mat2
the second coordinate matrix (the reference)
- feature_mat1
the first feature matrix
- feature_mat2
the second feature matrix
- wsigma
the sigma for the feature heat kernel
- alpha
the mixing weight for the spatial distance (1=all spatial weighting, 0=all feature weighting)
- nnk
the maximum number of spatial nearest neighbors to include
- maxk
the maximum number of neighbors to include within spatial window
- weight_mode
the type of weighting to use: "binary" or "heat" (default: "binary")
- sigma
the spatial sigma for the heat kernel weighting (default: 1)
- dthresh
the threshold for the spatial distance
- normalized
whether to normalize the rows to sum to 1