cosine_sim: Cosine similarity between two vectors

Description Usage Arguments Value Examples

View source: R/sigfit_utility.R

Description

Cosine similarity between two vectors

Usage

1
cosine_sim(x, y)

Arguments

x

Vector of real values

y

Vector of real values, same length as x

Value

Similarity measure between x and y, where 0 means no similarity, and 1 means maximum similarity.

Examples

1
cosine_sim(c(1,2,3,4), c(4,3,2,1))

kgori/sigfit documentation built on Feb. 3, 2022, 12:04 p.m.