Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fast distance matrix #8

Open
markvanderloo opened this issue Sep 27, 2018 · 0 comments
Open

fast distance matrix #8

markvanderloo opened this issue Sep 27, 2018 · 0 comments

Comments

@markvanderloo
Copy link
Owner

We can do a dist matrix naively as follows:

gower_distmat <- function(x,...){
  i <- seq_len(nrow(x))
  I <- rep(i, each=nrow(x))
  J <- rep(i, times=nrow(x))
  d <- gower_dist(x[I,],x[J,],...)
  as.dist(matrix(d, nrow=nrow(x)))
}

but that's pretty memory-inefficient. Should do this from C level w/o copying.

markvanderloo added a commit that referenced this issue Jun 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant