ehrapy.data.heart_failure#

ehrapy.data.heart_failure(encoded=False, columns_obs_only=None)[source]#

Loads the heart failure dataset.

More details: http://archive.ics.uci.edu/ml/datasets/Heart+failure+clinical+records Preprocessing: https://github.com/theislab/ehrapy-datasets/tree/main/heart_failure This dataset only contains numericals and therefore does not need any encoding.

Parameters:
  • encoded (bool) – Whether to return an already encoded object

  • columns_obs_only (Union[dict[str, list[str]], list[str], None]) – Columns to include in obs only and not X.

Return type:

AnnData

Returns:

AnnData object of the MIMIC-II dataset

Examples

>>> import ehrapy as ep
>>> adata = ep.dt.heart_failure(encoded=True)