Tree.read_distance_matrix

Read distance matrix of the same format outputed by folder.distance_matrix. [source]
Parameters:
dm_path : string
  Distance matrix file path.

file_extension :
string default = '.txt'
  Compressed files extention.
Returns:
dm : array_like
  Distance matrix saved in a numpy array.

labels :
array_like
  The labels of all objects inside the distance matrix.
See also:
folder.distance_matrix
 Computes the normalized compression distance between all documents inside the folder.

tree.make_tree
 Search for the best tree of a given distance matrix.

Example:

# Imports
from zgli.tree import read_distance_matrix

# Read distance matrix
dm, labels = read_distance_matrix('distmatrix.txt')