Parallel distance Matrix in R

前端 未结 6 705
忘掉有多难
忘掉有多难 2020-12-08 17:14

currently I\'m using the build in function dist to calculate my distance matrix in R.

dist(featureVector,method=\"manhattan\")

This is curr

6条回答
  •  攒了一身酷
    2020-12-08 17:17

    The R package amap provides robust and parallelized functions for Clustering and Principal Component Analysis. Among these functions, Dist method offers what you are looking for: computes and returns the distance matrix in a parallel manner.

    Dist(x, method = "euclidean", nbproc = 8)
    

    The code above compute euclidean distance with 8 threads.

提交回复
热议问题