cluster_matrix#

montreal_forced_aligner.diarization.multiprocessing.cluster_matrix(ivectors, cluster_type, metric=DistanceMetric.euclidean, strict=True, no_visuals=False, working_directory=None, **kwargs)[source]#

Wrapper function for sklearn’s clustering methods

Parameters:
  • ivectors (numpy.ndarray) – Ivectors to cluster

  • cluster_type (ClusterType) – Clustering algorithm

  • metric (DistanceMetric) – Distance metric to use in clustering

  • strict (bool) – Flag for whether to raise exceptions when only one cluster is found

  • kwargs – Extra keyword arguments to pass to sklearn cluster classes

Returns:

Cluster labels for each utterance

Return type:

numpy.ndarray