mosaicmpi.network.Network.get_median_community_usage#
- Network.get_median_community_usage(subset_datasets: str | Iterable[str] | None = None, normalize: bool = True, discretize: bool = False)#
Get median usage of each community of programs for each sample.
- Parameters:
subset_datasets (str or Iterable[str], optional) – dataset name or iterable of dataset names to subset the results, defaults to None
normalize (bool, optional) – Normalize the community usage matrix such that for each value of k, usage of all communities of programs sums to 1. Defaults to False
discretize (bool, optional) – Discretizes the community usage matrix such that for each value of k, each sample has usage of only 1 community (the one with the maximum usage). Defaults to False
- Returns:
observations × communities matrix
- Return type:
pd.DataFrame