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 tree creation with 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  
    Fasting Blood Sugar True True  
    Exercise Angina * *  
    Rest ECG 0 1  
    Slope 1 3  
    Thal Normal Normal  
    Chest Pain Type 2 1  
    Major Vessels 0 2  
  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.

7 Node Classification Tree: Heart Disease versus Age, Rest Blood Pressure, Cholesterol, Max Heart Rate, Old Peak, Sex, Fasting Blood Sugar, Exercise Angina, Rest ECG, Slope, Thal, Chest Pain Type, Major Vessels

Optimal Tree: 7 terminal nodes, 6 internal nodes Max Tree: 21 terminal nodes, 20 internal nodes Classification Tree Predict

Prediction for Heart Disease

Settings

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

Prediction Prob Prob Terminal (Class (Class Obs Node Id Class = Yes) = No) 1 1 No 0.09 0.91

Prediction for Heart Disease

Settings

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

Prediction Terminal Prob (Class Prob (Class Obs Node Id Class = Yes) = No) 2 4 Yes 0.740741 0.259259
By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy