sksurv.datasets.load_whas500#

sksurv.datasets.load_whas500(*, output_type='pandas')[source]#

Load and return the Worcester Heart Attack Study dataset

The dataset has 500 samples and 14 features. The endpoint is death, which occurred for 215 patients (43.0%).

See [1], [2] for further description.

Parameters:

output_type ({"pandas", "polars"}, default="pandas") – Dataframe library used for the returned features.

Returns:

  • x (pandas.DataFrame or polars.DataFrame) – The measurements for each patient.

  • y (structured array with 2 fields) – fstat: boolean indicating whether the endpoint has been reached or the event time is right-censored.

    lenfol: total length of follow-up (days from hospital admission date to date of last follow-up)

References