This wrapper prepares the data into a distance matrix to send to
stats::hclust
and retains the parameters num_clusters
or h
as an
attribute.
.hier_clust_fit_stats(
x,
num_clusters = NULL,
cut_height = NULL,
linkage_method = NULL,
dist_fun = philentropy::distance
)
A dendrogram
matrix or data frame
the number of clusters
the height to cut the dendrogram
the agglomeration method to be used. This should be (an
unambiguous abbreviation of) one of "ward.D"
, "ward.D2"
, "single"
,
"complete"
, "average"
(= UPGMA), "mcquitty"
(= WPGMA), "median"
(=
WPGMC) or "centroid"
(= UPGMC).
A distance function to use