aquaduct.geom.cluster module

This module provides functions for clustering. Clustering is done by scikit-learn module.

class BarberClusterResult(labels_)[source]

Bases: object

Helper class for results of barber clustering.

class BarberCluster[source]

Bases: object

Wrapper class that implements barber clustering.

static fit(coords, spheres=None, radii=None)[source]
Parameters
  • coords (Iterable) – Input coordinates of points to be clustered.

  • spheres (Iterable) – Input spheres for each point. Each sphere has center and radius.

  • radii (Iterable) – Radii to create spheres using coords.

MeanShiftBandwidth(X, **kwargs)[source]

Helper function for automatic calculation of a bandwidth for MeanShift method.

Parameters

X (Iterable) – Coordinates of points to be clustered.

class PerformClustering(method, **kwargs)[source]

Bases: object

Helper class for clustering.

fit(coords, spheres=None)[source]
Parameters
  • coords (Iterable) – Input coordinates of points to be clustered.

  • spheres (Iterable) – Input spheres for each point. Optional, important only if method is BarberCluster.

Returns

Clusters numbers.

Return type

list of int

centers()[source]
Returns

Centers of clusters.