cosine

First introduced in version: 3.00.5, 3.00.4.3

Syntax

cosine(X, Y)

Details

Compute the cosine similarity between X and Y. The cosine similarity between X and Y, is defined as (X · Y) / (||X|| × ||Y||).

Parameters

X and Y are numeric vectors with the same number of elements.

Returns

A DOUBLE scalar.