expand_label_similarity: Expand Similarity Between Labels Based on a Precomputed...

View source: R/label_sim.R

expand_label_similarityR Documentation

Expand Similarity Between Labels Based on a Precomputed Similarity Matrix

Description

Expands the similarity between labels based on a precomputed similarity matrix, 'sim_mat', with either above-threshold or below-threshold values depending on the value of the 'above' parameter.

Usage

expand_label_similarity(labels, sim_mat, threshold = 0, above = TRUE)

Arguments

labels

A vector of labels for which the similarities will be expanded.

sim_mat

A precomputed similarity matrix containing similarities between the unique labels.

threshold

A threshold value used to filter the expanded similarity values (default: 0).

above

A boolean flag indicating whether to include the values above the threshold (default: TRUE) or below the threshold (FALSE).

Value

A sparse symmetric similarity matrix with the expanded similarity values.


bbuchsbaum/neighborweights documentation built on April 1, 2024, 8:41 p.m.