mosaicmpi.dataset.Dataset.get_usages

mosaicmpi.dataset.Dataset.get_usages#

Dataset.get_usages(k: int | Iterable = None, discretize: bool = False, normalize: bool = False) DataFrame#

Generate dataframe of program usage.

Parameters:
  • k (int, optional) – If an integer or list of integers, returns usages only for specified ranks. Otherwise, returns usage of all programs across ranks. Defaults to None

  • discretize (bool, optional) – Discretizes the usage matrix such that for each value of k, each sample has usage of only 1 program (the one with the maximum usage). Defaults to False

  • normalize (bool, optional) – Normalize the program usage matrix such that for each value of k, usage of all programs sums to 1. Defaults to False

Returns:

observation × program matrix

Return type:

pd.DataFrame