Fork me on GitHub

src/arraymancer/ml/clustering/dbscan

Search:
Group by:
  Source Edit

Procs

proc dbscan[T: SomeFloat](X: Tensor[T]; eps: float; minSamples: int;
                          metric: typedesc[AnyMetric] = Euclidean; p = 2.0): seq[
    int]
Performs DBSCAN clustering on the input data X. X needs to be a tensor of rank 2 with the following shape:
  • [n_observations, n_dimensions]

so that we have n_observations points that each have a dimensionality of n_dimensions (or sometimes called number of features).

eps is the radius in which we search for neighbors around each point using the give metric.

minSamples is the minimum number of elements that need to be in the search radius eps to consider a set of points a proto-cluster (the "core points"), from which to compute the final clusters.

If we use the Minkowski metric, p is the power to use in it. Otherwise the value is ignored.

  Source Edit
Arraymancer Technical reference Tutorial Spellbook (How-To's) Under the hood