skbio.tree.TreeNode.from_linkage_matrix

classmethod TreeNode.from_linkage_matrix(linkage_matrix, id_list)[source]

Return tree from SciPy linkage matrix.

State: Experimental as of 0.4.0.

Parameters
  • linkage_matrix (ndarray) – A SciPy linkage matrix as returned by scipy.cluster.hierarchy.linkage

  • id_list (list) – The indices of the id_list will be used in the linkage_matrix

Returns

An unrooted bifurcated tree

Return type

TreeNode

See also

scipy.cluster.hierarchy.linkage()