get_similarity_rank_matrix {ontologySimilarity}R 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.


[Package ontologySimilarity version 2.7 Index]