Example of prediction with CART® Classification

A team of researchers collects and publishes detailed information about factors that affect heart disease. Variables include age, sex, cholesterol levels, maximum heart rate, and more. This example is based on a public data set that gives detailed information about heart disease. The original data are from archive.ics.uci.edu.

In the example of tree creation, the researchers created a classification tree that identifies important predictors to indicate whether a patient has heart disease. The researchers want to make predictions with this tree.

  1. Complete Example of CART® Classification.
  2. Click the Predict button at the bottom of the classification tree results.
  3. From the drop-down list, select Enter individual values.
  4. Enter the following values. This example uses 2 values for each predictor. It is important to choose values that are within the range of the original data. This example uses 2 values for each predictor, so the third column remains empty.
    Age 35 35  
    Rest Blood Pressure 140 140  
    Cholesterol 233 233  
    Max Heart Rate 150 165  
    Old Peak 2.3 2.3  
    Sex Male Female  
    Chest Pain Type 2 1  
    Fasting Blood Sugar True True  
    Rest ECG 0 1  
    Exercise Angina      
    Slope 1 3  
    Major Vessels 0 2  
    Thal Normal Normal  
  5. Click OK.

Interpret the results

Minitab uses the classification tree in the results to estimate the class probability for the 2 sets of prediction values.
  • For the first set of prediction values, the settings are the same as the settings for Terminal Node 1. The class prediction is No. The probability for No is 0.91, and the probability for Yes is 0.09.
  • For the second set of prediction values, the settings are the same as the settings for Terminal Node 4. The class prediction is Yes. The probability for Yes is about 0.74, and the probability for No is about 0.26.

Prediction for Heart Disease

Settings

Age = 35,Rest Blood Pressure = 140,Cholesterol = 233,Max Heart Rate = 150,
Old Peak = 2.3,Sex = Male,Chest Pain Type = 2,Fasting Blood Sugar = True,
Rest ECG = 0,Exercise Angina = "",Slope = 1,Major Vessels = 0,Thal = Normal

Prediction

ObsTerminal
Node ID
ClassProb
(Class
= Yes)
Prob
(Class
= No)
11No0.090.91

Prediction for Heart Disease

Settings

Age = 35,Rest Blood Pressure = 140,Cholesterol = 233,Max Heart Rate = 165,
Old Peak = 2.3,Sex = Female,Chest Pain Type = 1,Fasting Blood Sugar = True,
Rest ECG = 0,Exercise Angina = "",Slope = 3,Major Vessels = 2,Thal = Normal

Prediction

ObsTerminal
Node ID
ClassProb (Class
= Yes)
Prob (Class
= No)
24Yes0.7407410.259259