DBSCAN clustering

>>> from mlpack import dbscan

This program implements the DBSCAN algorithm for clustering using accelerated tree-based range search. The type of tree that is used may be parameterized, or brute-force range search may also be used.

The input dataset to be clustered may be specified with the 'input' parameter; the radius of each range search may be specified with the 'epsilon' parameters, and the minimum number of points in a cluster may be specified with the 'min_size' parameter.

The 'assignments' and 'centroids' output parameters may be used to save the output of the clustering. 'assignments' contains the cluster assignments of each point, and 'centroids' contains the centroids of each cluster.

The range search may be controlled with the 'tree_type', 'single_mode', and 'naive' parameters. 'tree_type' can control the type of tree used for range search; this can take a variety of values: 'kd', 'r', 'r-star', 'x', 'hilbert-r', 'r-plus', 'r-plus-plus', 'cover', 'ball'. The 'single_mode' parameter will force single-tree search (as opposed to the default dual-tree search), and ''naive' will force brute-force range search.

An example usage to run DBSCAN on the dataset in 'input' with a radius of 0.5 and a minimum cluster size of 5 is given below:

>>> dbscan(input=input, epsilon=0.5, min_size=5)

input options

output options

The return value from the binding is a dict containing the following elements: