, columns_obs_only=None)[source]#

Loads the preprocessed diabetes-130 dataset by fairlearn

This loads the dataset from the fairlearn.datasets.fetch_diabetes_hospital function.

More details: [1]

Preprocessing: [2]

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

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

Return type:



AnnData object of the diabetes-130 dataset processed by the fairlearn team


>>> import ehrapy as ep
>>> adata = ep.dt.diabetes_130_fairlearn()


[1] Beata Strack, Jonathan P. DeShazo, Chris Gennings, Juan L. Olmo, Sebastian Ventura, Krzysztof J. Cios, and John N. Clore, “Impact of HbA1c Measurement on Hospital Readmission Rates: Analysis of 70,000 Clinical Database Patient Records,” BioMed Research International, vol. 2014, Article ID 781670, 11 pages, 2014.

[2] Bird, S., Dudík, M., Edgar, R., Horn, B., Lutz, R., Milan, V., … & Walker, K. (2020). Fairlearn: A toolkit for assessing and improving fairness in AI. Microsoft, Tech. Rep. MSR-TR-2020-32.