title: Precomputed distance matrix in DBSCAN
body: <p>Reading around, I find it is possible to pass a precomputed distance matrix into <a href="https://scikit-learn.org/stable/modules/generated/sklearn.cluster.DBSCAN.html" rel="nofollow noreferrer">SKLearn DBSCAN</a>. Unfortunately, I don't know how to pass it for calculation.</p>
  <p>Say I have a 1D array with 100 elements, with just the names of the nodes. Then I have a 2D matrix, 100x100 with the distance between each element (in the same order).</p>
  <p>I know I have to call it:</p>
  <p><code>db = DBSCAN(eps=2, min_samples=5, metric=&quot;precomputed&quot;)</code></p>
  <p>For a distance between nodes of 2 and a minimum of 5 node clusters. Also, use &quot;precomputed&quot; to indicate to use the 2D matrix. But how do I pass the info for the calculation?</p>
  <p>The same question could apply if using RAPIDS <a href="https://docs.rapids.ai/api/cuml/stable/api.html#dbscan" rel="nofollow noreferrer">CUML DBScan</a> function (GPU accelerated).</p>