# DBSCAN (/docs/analyses/dbscan)



## When to use it [#when-to-use-it]

Use DBSCAN when you want clusters of dense points and you are willing to leave sparse points as noise, rather than forcing every row into k groups. A fixed k is [cluster analysis](/docs/analyses/cluster-analysis).

## Assumptions [#assumptions]

Columns are numeric. Epsilon starts at 0.5, minimum samples at 5, standardize on. HTTP and chat dispatch both honour `standardize`. If more than 30% of rows are noise, the report warns. There is no k to choose.

## Running it in Tensr [#running-it-in-tensr]

<Steps>
  <Step>
    ML → Clustering → DBSCAN. In chat: “DBSCAN on hours and anxiety.”
  </Step>

  <Step>
    Put the numeric columns in the feature list. Epsilon, minimum samples, and standardize start at 0.5, 5, and on.
  </Step>
</Steps>

## Options [#options]

<TypeTable
  type="{
  columns: {
    type: 'string[]',
    description: 'Numeric features. At least one.',
  },
  epsilon: {
    type: 'number > 0',
    description: 'Neighbourhood radius.',
    default: '0.5',
  },
  min_samples: {
    type: '1–100',
    description: 'Minimum points to form a dense region.',
    default: '5',
  },
  standardize: {
    type: 'boolean',
    description: 'Z-score the columns first. HTTP and chat dispatch both honour this.',
    default: 'true',
  },
  decimal_places: {
    type: '0–6',
    description: 'Report output. Decimal places.',
    default: '3',
  },
  apa_format: {
    type: 'boolean',
    description: 'Report output. APA-style p-values.',
    default: 'true',
  },
  include_charts: {
    type: 'boolean',
    description: 'Report output. 2-D scatter of the first two features, coloured by cluster.',
    default: 'true',
  },
}"
/>

## Reading the output [#reading-the-output]

The two blobs, ε = 0.8, min\_samples = 5, standardised. Dense cores should appear, with a modest noise share.

| Cluster | Size |
| ------: | ---: |
|       0 |  120 |
|       1 |  120 |

2 dense cluster(s), 0 noise points (0%). ε = 0.8 on two well-separated blobs after standardising should recover the cores and leave a modest noise share.

## Reporting (APA 7) [#reporting-apa-7]

DBSCAN on x and y, ε = 0.8, min\_samples = 5, 2 cluster(s), 0 noise points.

## Coming from SPSS [#coming-from-spss]

SPSS has no DBSCAN dialog. Tensr’s item is on the ML menu, Clustering → DBSCAN. The path string stored for this item matches that menu.

## Related [#related]

A chosen number of groups is [cluster analysis](/docs/analyses/cluster-analysis).
