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, ...)

Arguments

hcl

hierarchical clustering in the form an 'hclust' object.

threshold

density threshold.

...

Additional parameters passed to density.

Value

The cut-off value to use with cutree.

Details

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.