CosinusDistance {BIDistances}R Documentation

Cosine Distance

Description

Calculates the cosine distance

Usage

CosinusDistance(Data)

Arguments

Data

[1:n,1:d] matrix with n cases, d variables

Details

https://en.wikipedia.org/wiki/Cosine_similarity

Value

Distance

[1:n,1:n] symmetric matrix, containing the distanes of the cases (rows) for the given data

Note

The cosine distance is calculated by calculating the cosine similarity d(i,j)=\max{s}-s(i,j), where s is the cosine similarity and the d the cosine distance.

Author(s)

Michael Thrun

Examples

data(Hepta)
distMatrix = CosinusDistance(Hepta$Data)

[Package BIDistances version 0.1.3 Index]