tumourkit.postprocessing.draw_rips.draw_rips

tumourkit.postprocessing.draw_rips.draw_rips(orig: ndarray, D: ndarray, x: ndarray, y: ndarray, labels: ndarray, type_info: Dict[str, Tuple[str, List[int]]], save_path: str, epsilon: float, use_metric: bool) ndarray

Draws the Vietoris Rips diagram for a given theshold.

Parameters:
  • orig (np.ndarray) – The original data used to construct the graph.

  • D (np.ndarray) – Distance matrix.

  • x (np.ndarray) – Node features used for plotting.

  • y (np.ndarray) – Node coordinates used for plotting.

  • labels (np.ndarray) – Node labels used for visualization.

  • type_info (Dict[str, Tuple[str, List[int]]]) – A dictionary containing type information as keys and RGB tuples as values.

  • save_path (str) – The file path to save the resulting graph visualization.

  • epsilon (float) – The threshold for the complex creation.

  • use_metric (bool) – If true use points, when false use graph.

Returns:

The image of the graph.

Return type:

np.ndarray