get_similarity_rank_matrix: Get matrix of similarity rank from similarity matrix

View source: R/term-set-sim.R

get_similarity_rank_matrixR Documentation

Get matrix of similarity rank from similarity matrix

Description

Given a lower triangular similarity matrix, construct a distance matrix where the rows are the ranks of the column cases with respect to similarity to the row case. If relative similarity is of interest, this rank-transformation may reduce bias in favour of high similarity scores in downstream analysis.

Usage

get_similarity_rank_matrix(similarity_matrix, symmetric = TRUE)

Arguments

similarity_matrix

Lower triangular numeric matrix of similarities, where the rownames and colnames are identical to the case IDs.

symmetric

Logical value determining whether to ‘symmetrify’ resultant matrix by averaging rank similarity of A -> B and B -> A.

Value

Matrix of rank similarities.


ontologySimilarity documentation built on May 29, 2024, 3:51 a.m.