Part 2 — Heart-disease data
Source: OpenML heart-statlog, ID 53, version 1. Downloaded 12 October 2026 from the URL in the saved OpenML metadata. The metadata lists the licence as Public. The original data are attributed to Janosi, Steinbrunn, Pfisterer and Detrano (1988), as cited by the article.
The snapshot has 270 patients, 13 predictors and a binary target: 150 absent, 120 present. It is the OpenML Statlog heart dataset matching the article’s sample size, predictor definitions and outcome; the inaccessible companion repository prevents verification against the authors’ own prepared data file.
raw/heart-statlog.arff is unchanged. SHA-256: e16082cc6158f29be2e7b081953cd6edf342760d135bccdb64e191d0834d6300. raw/openml-53-metadata.json preserves the source metadata. processed/heart.csv is regenerated by R/01-data.R.
Preprocessing
The ARFF target already uses absent/present. The preparation script renames predictors to the article’s appendix names and applies its category definitions. No rows are removed and no imputation is needed. The seven categorical fields are sex, chest_pain, fasting_blood_sugar, resting_ecg, exercise_induced_angina, ST_slope and thal. The other six are explicitly numeric, including the vessel count, as in the appendix.
For the neural network, the three binary predictors use 0/1 and the four other categorical predictors use full indicator encoding, giving 22 columns. Full indicator encoding of all seven categorical predictors would give 25 columns. The article states 22 inputs but does not publish the encoding implementation. Our 22-column construction is therefore an explicit reconstruction. Numeric scaling is fitted on the inner training portion, excluding validation and test rows; scaling details are not specified in the published example. For XGBoost, fixed categorical contrasts produce a numeric design matrix.
The outcome describes heart disease in this teaching sample. It is not a population cardiovascular risk score or a future-event endpoint.