cosine_similarity: Computes cosine similarity between two vectors.

Description Usage Arguments Examples

View source: R/cosine_similarity.R

Description

Computes cosine similarity between two vectors.

Usage

1

Arguments

x

A vector of numbers.

y

Another vector of numbers, of the same length as x.

Examples

1
2
3
x = c(3,0,0,2)
y = c(0,2,0,1)
cosine_similarity(x, y)

michaelgavin/geosemantics documentation built on May 7, 2019, 3:35 p.m.