# spopt.region.extract_clusters

spopt.region.extract_clusters(linkage_matrix, min_cluster_size, extraction='eom')

  Extract cluster types from a linkage matrix.

  Parameters:
    linkage_matrix `np.ndarray`

      A hierarchical clustering encoded as an array in `scipy.cluster.hierarchy.linkage` format.

    min_cluster_size `python:int`

      The minimum number of observations that forms a cluster.

    extraction: str (default “eom”)

      The cluster extraction scheme. “eom” is Excess of Mass, “leaf” is Leaf extraction.

  Returns:
    `numpy.array`

      Cluster labels for observations.