Cos_Distance: Cos_Distance function

View source: R/Cos_Distance.R

Cos_DistanceR Documentation

Cos_Distance function

Description

Cos_Distance function

Usage

Cos_Distance(X, v)

Arguments

X

n x m matrix

v

1 x m vector

Value

column matrix of the (Cosine Similarity) Distances calculated between the rows of X and the vector v

Examples

X = matrix(c(1,1,0,1,1,0), nrow = 2, byrow = FALSE)
v = c(0,0,1)
Cos_Distance(X,v)
# Returns the following:
# [0.2928932, 1.0000000]'


llrebecca21/ClusterPack documentation built on April 15, 2022, 4:37 a.m.