Skip to contents

Calculate distances from keys to keys

Usage

calc_dist(
  conn,
  keys,
  q,
  normalized = TRUE,
  method = c("euclidean", "chisquared", "kullback", "manhattan", "maximum", "canberra",
    "minkowski", "hamming"),
  ...
)

Arguments

conn

a Magnitude connection.

keys

character vector.

q

character vector.

normalized

logical; whether or not vector embeddings should be normalized?

method

string; method to compute distance.

...

other arguments are passed to proxyC::dist.

Value

a sparse Matrix of 'Matrix' package.