tumourkit.classification.infer.save_probs

tumourkit.classification.infer.save_probs(probs: Dict[str, ndarray], node_dir: str, output_dir: str, num_classes: int, enable_background: bool) None

Saves the probabilities in .nodes.csv files by appending a column to the original .nodes.csv file.

Parameters:
  • probs (Dict[str, np.ndarray]) – The probabilities for each graph.

  • node_dir (str) – The directory containing the original .nodes.csv files.

  • output_dir (str) – The directory where the updated .nodes.csv files will be saved.

  • enable_background (bool) – Enable when model has extra head to correct extra cells.

  • num_classes (int) – The number of classes.