aquaduct.geom.cluster module

This module provides functions for clusterization. Clusterization is done by scikit-learn module.

get_required_params(method)[source]
class BarberClusterResult(labels_)[source]

Bases: object

Helper class for results of barber clusterization.

__init__(labels_)[source]
class BarberCluster[source]

Bases: object

Wrapper class that implements barber clusterization.

fit(coords, spheres=None)[source]
Parameters:
  • coords (Iterable) – Input coordinates of points to be clustered.
  • spheres (Iterable) – Input spheres for each point.
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 clusterization.

__init__(method, **kwargs)[source]
Parameters:method (object) – Class that implements cclusterization via fit method.
__str__()[source]
__call__(coords, spheres=None)[source]
_get_noclusters(n)[source]
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.