I have a matrix of 3600x513 and i want to determine the distances between the rows to be able to cluster. My problem is I want to use the COSH distance, which is not available in the dist() function of R.
My questions are:
I'll just add the post from CrossValidated for visibility (original post):
set.seed(1)
mat <- matrix(runif(5))
fn <- function(x, y) 1 - cos(x - y)
proxy::dist(mat, method = fn)
proxy
lets you use dist
with a custom function