ehrapy.data.diabetes_130_fairlearn

ehrapy.data.diabetes_130_fairlearn(encoded=False, 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: http://archive.ics.uci.edu/ml/datasets/Diabetes+130-US+hospitals+for+years+1999-2008 [1]

Preprocessing: https://fairlearn.org/v0.10/api_reference/generated/fairlearn.datasets.fetch_diabetes_hospital.html#fairlearn.datasets.fetch_diabetes_hospital [2]

Parameters:
  • 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

Returns:

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

Examples

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

References

[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.