hierarchical_clustering#

gammapy.utils.cluster.hierarchical_clustering(features, linkage_kwargs=None, fcluster_kwargs=None)[source]#

Hierarchical clustering using given features.

Parameters
featuresTable

Table containing the features.

linkage_kwargsdict, optional

Arguments forwarded to scipy.cluster.hierarchy.linkage. Default is None, which uses method=”ward” and metric=”euclidean”.

fcluster_kwargsdict, optional

Arguments forwarded to scipy.cluster.hierarchy.fcluster. Default is None, which uses criterion=”maxclust” and t=3.

Returns
featuresTable

Table containing the features and an extra column for the groups labels.