# DBSCAN

Kloudfuse provides Density-based spatial clustering of applications with noise (DBSCAN) implementation of [Outlier Detection](https://docs.kloudfuse.com/platform/3.3.6/fuseql-outliers/).

In DBSCAN, the tolerance level, or `eps`, determines the clustering radius of the neighborhood around each point. The `eps` controls the sensitivity of outlier detection. A lower tolerance detects more subtle outliers, while a higher tolerance detects only the most significant deviations.

## In Dashboards

To use the `dbscan` in a dashboard, apply the following function:

```code
dbscan( 
  ${promql}, \ (1)
  ${tolerance}, \ (2)
  1, 1 
)
```

codeCopied!

|     |     |
| --- | --- |
| **1** | `${promql}`: PromQL query to evaluate |
| **2** | `${tolerance}`: The sensitivity of DBSCAN; value range between `0.33` and `5.0`, inclusive. A lower value is more sensitive to deviations. |

## Limitations

The alert rule evaluates all data points pulled by the query. When used in a dashboard, evaluates the whole data collection, not individual time slices. If a time series triggers an alert, then the whole time range is in active alerting state. This presents differently from other alert functions used in the dashboard.

## Next steps

For an in-depth discussion of the DBSCAN algorithm, see these external resources:

- [DBSCAN Key Concepts and Parameters](https://www.datacamp.com/tutorial/dbscan-clustering-algorithm.html) in DataCamp Tutorials
- [DBSCAN](https://en.wikipedia.org/wiki/https://en.wikipedia.org/wiki/DBSCAN.html) in Wikipedia
