# DBSCAN Clustering


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

------------------------------------------------------------------------

<a
href="https://github.com/michaelaye/p4tools/blob/main/p4tools/production/dbscan.py#L74"
target="_blank" style="float:right; font-size:smaller">source</a>

### plot_results

``` python

def plot_results(
    p4id, labels, data:NoneType=None, kind:NoneType=None, reduced_data:NoneType=None, ax:NoneType=None
):

```

*Plots the results of a clustering algorithm.* Parameters ———- p4id :
object An object that contains methods for plotting and showing
subframes. labels : array-like Cluster labels for each point in the
dataset. data : pandas.DataFrame, optional The original data points with
‘x’ and ‘y’ coordinates. Default is None. kind : str, optional The type
of marking to plot (e.g., ‘blotch’, ‘fan’). Default is None.
reduced_data : pandas.DataFrame, optional The reduced data points to be
plotted. Default is None. ax : matplotlib.axes.Axes, optional The axes
on which to plot. If None, a new figure and axes are created. Default is
None. Returns ——- None

------------------------------------------------------------------------

<a
href="https://github.com/michaelaye/p4tools/blob/main/p4tools/production/dbscan.py#L25"
target="_blank" style="float:right; font-size:smaller">source</a>

### get_average_objects

``` python

def get_average_objects(
    clusters, # table with rows of markings (fans or blotches) to be averaged
    kind, # Switch to control the circularity for the average angle calculation.
):

```

*Create the average object out of a sequence of clusters.*

------------------------------------------------------------------------

<a
href="https://github.com/michaelaye/p4tools/blob/main/p4tools/production/dbscan.py#L112"
target="_blank" style="float:right; font-size:smaller">source</a>

### DBScanner

``` python

def DBScanner(
    msf:float=0.13, savedir:NoneType=None, with_angles:bool=True, with_radii:bool=True, do_large_run:bool=True,
    save_results:bool=True, only_core_samples:bool=False, data:NoneType=None, dbname:NoneType=None
):

```
