Uses a heuristic similar to the one described in Section 3.1 of the original Mapper paper to cut a given hierarchical tree to produce a partitioning of the data.

cutoff_first_threshold(hcl, threshold = 0, ...)



hierarchical clustering in the form an 'hclust' object.


density threshold.


Additional parameters passed to density.


The cut-off value to use with cutree.


The cut value is chosen as the lowest (interpolated) height value where the density of linkage distances is lower than or equal to a given threshold value. Note that while this method offers a smooth alternative to cutoff_first_bin and may provide empirically better clusterings, it's noticeably slower due to the call the density.