frow_cos_sim: Fast calculation of cosine similarity between rows of two...

Description Usage Arguments Details Value

View source: R/RcppExports.R

Description

Fast calculation of cosine similarity between rows of two matrices

Usage

1

Arguments

x

numeric matrix of dimension n times k

y

numeric matrix of dimension m times k

Details

this code divides x * y.t() by the row-wise norms of both x and y. If the norms get extremely small, the results might be numerically unstable. Use at own risk.

Value

matrix of dimension n times m where the (i,j)th element is the cosine similarity between the ith row of x and the jth row of y


baruuum/btoolbox documentation built on Aug. 17, 2020, 1:29 a.m.