Function clusterByThreshold

  • Extracts clusters from a similarity graph based on a user-defined threshold. The threshold is used to trim weak edges leaving one or more fully connected sub graphs. This simple approach can lead to weak connections joining two or more otherwise independent clusters. See clusterWithCohesion for a smarter alternative

    Parameters

    Returns number[][]

    An array of clusters, sorted by size (largest first).