Skip to contents

Calculates the cosine similarity between all pairs of rows in a matrix.

Usage

calculate_cosine_similarity(matrix_data)

Arguments

matrix_data

A numeric matrix where rows represent documents/observations

Value

A square similarity matrix with values between -1 and 1