Feedback:

fit DBSCAN

Use the DBSCAN algorithm when you want to fit a model to cluster the data using the scikit-learn DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm.

Syntax

fit DBSCAN [option_name]=[value] <fields>

[option_name]=[value]

Specify model parameters. The following model parameters are supported:

  • eps={float}, default=0.5

  • min_samples={integer}, default=5

  • metric={string}, default=euclidean

  • metric_params={dict}, default=None

  • algorithm={'auto', 'ball_tree', 'kd_tree', 'brute'}, default='auto'

  • leaf_size={integer}, default=30

  • p={float}, default=None

For information on the model parameters, refer to scikit learn documentation:

https://scikit-learn.org/stable/modules/generated/sklearn.cluster.DBSCAN.html

<fields> Input fields for clustering.

Usage

You can use the DBSCAN algorithm to fit a model that clusters the value of numeric fields using the scikit-learn DBSCAN algorithm. The input training data has to be preprocessed, encoded, and normalized if required before passing to this algorithm.

Examples

Example 1: Apply DBSCAN clustering algorithm.

Copy
|fit dbscan sepal_length sepal_width petal_length petal_width species

Example 2: Cluster data with custom parameters.

Copy
|fit dbscan eps=0.6 algorithm='ball_tree' sepal_length sepal_width petal