powered by
This function calculates a distance matrix from a given co-occurrence matrix.
calculate_distance_matrix(cooccurrence_matrix)
A distance matrix computed from the normalized co-occurrence matrix.
A matrix representing the co-occurrence counts of elements.
# 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)
Run the code above in your browser using DataLab