View source: R/distance_matrix.R
calculate_distance_matrix | R Documentation |
This function calculates a distance matrix from a given co-occurrence matrix.
calculate_distance_matrix(cooccurrence_matrix)
cooccurrence_matrix |
A matrix representing the co-occurrence counts of elements. |
A distance matrix computed from the normalized co-occurrence matrix.
# Example usage:
cooccurrence_matrix <- matrix(c(3, 2, 1, 2, 5, 0, 1, 0, 4), nrow = 3, byrow = TRUE)
result <- calculate_distance_matrix(cooccurrence_matrix)
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.