fetch_medical_charge#

skrub.datasets.fetch_medical_charge(data_home=None)[source]#

Fetches the medical charge dataset (regression), available at skrub-data/skrub-data-files

The dataset provides information on inpatient discharges for Medicare fee-for-service beneficiaries. It includes information on utilization, payment (total payment and Medicare payment), and hospital-specific charges for the more than 3,000 U.S. hospitals that receive Medicare Inpatient Prospective Payment System (IPPS) payments. Size on disk: 36MB.

Parameters:
data_homestr or path-like, default=None

The directory where to download and unzip the files.

Returns:
bunchBunch

A dictionary-like object with the following keys:

medical_chargeDataFrame of shape (163065, 12)

The dataframe.

XDataFrame of shape (163065, 11)

Features, i.e. the dataframe without the target labels.

yDataFrame of shape (163065, 1)

Target labels.

metadatadict

A dictionary containing the name, description, source and target.

pathstr

The path to the medical charge CSV file.

Examples

>>> from skrub.datasets import fetch_medical_charge
>>> data = fetch_medical_charge()
>>> print(data.keys())
dict_keys(['path', 'medical_charge', 'medical_charge_path', 'metadata',
  'metadata_path', 'X', 'y'])