StatlogHeart {evtree} | R Documentation |
Models of this data predict the absence or presence of heart disease.
data("StatlogHeart")
A data frame containing 270 observations on 14 variables.
age in years.
binary variable indicating sex.
factor variable indicating the chest pain type, with levels typical angina
, atypical angina
, non-anginal pain
and asymptomatic
.
resting blood pressure.
serum cholesterol in mg/dl.
binary variable indicating if fasting blood sugar > 120 mg/dl.
factor variable indicating resting electrocardiographic results, with levels 0
: normal, 1
: having ST-T wave abnormality (T wave inversions and/or ST elevation or depression of > 0.05 mV) and 2
: showing probable or definite left ventricular hypertrophy by Estes' criteria.
the maximum heart rate achieved.
binary variable indicating the presence of exercise induced angina.
oldpeak = ST depression induced by exercise relative to rest.
ordered factor variable describing the slope of the peak exercise ST segment, with levels upsloping
, flat
and downsloping
.
number of major vessels colored by flouroscopy.
factor variable thal, with levels normal
, fixed defect
and reversible defect
.
binary variable indicating the presence
or absence
of heart disease.
The use of a cost matrix is suggested for this dataset. It is worse to class patients with heart disease as patients without heart disease (cost = 5), than it is to class patients without heart disease as having heart disease (cost = 1).
The dataset has been taken from the UCI Repository Of Machine Learning Databases at
http://archive.ics.uci.edu/ml/.
data("StatlogHeart") summary(StatlogHeart) shw <- array(1, nrow(StatlogHeart)) shw[StatlogHeart$heart_disease == "presence"] <- 5 set.seed(1090) sht <- evtree(heart_disease ~ . , data = StatlogHeart, weights = shw) sht table(predict(sht), StatlogHeart$heart_disease) plot(sht)