View source: R/weights_from_distance_matrix.R
| weights_from_distance_matrix | R Documentation |
Transforms a distance matrix into weights (1/distance.matrix) normalized by the row sums. Used to compute Moran's I values and Moran's Eigenvector Maps. Allows to apply a threshold to the distance matrix before computing the weights.
weights_from_distance_matrix(
distance.matrix = NULL,
distance.threshold = 0
)
distance.matrix |
Distance matrix. Default: |
distance.threshold |
Numeric, positive, in the range of values of |
A weighted distance matrix.
Other preprocessing:
auto_cor(),
auto_vif(),
case_weights(),
default_distance_thresholds(),
double_center_distance_matrix(),
is_binary(),
make_spatial_fold(),
make_spatial_folds(),
the_feature_engineer()
data(plants_distance)
y <- weights_from_distance_matrix(
distance.matrix = plants_distance
)
y[1:5, 1:5]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.