scphylo.ul.hclustering#

scphylo.ul.hclustering(df, metric='l1', method='ward', return_dist=False)[source]#

Hierarchical clustering.

Parameters
  • df (pandas.DataFrame) – The genotype matrix.

  • metric (str, optional) –

    The metric option. Can be:

    • l1

    • cosine

  • method (str, optional) – The method for the hierarchical clustering, by default “ward”

Returns

A dictionary in which keys are the number of clusters and values are the cluster labels for each item.

Return type

dict