DriveML: Self-Drive machine learning projects

Automated machine learning classification model functions

Dayananda Ubrangala, Sayan Putatunda, Kiran R, Ravi Prasad Kondapalli

2021-06-12

1. Introduction

The document introduces the DriveML package and how it can help you to build effortless machine learning binary classification models in a short period.

DriveML is a series of functions such as AutoDataPrep, AutoMAR, autoMLmodel. DriveML automates some of the complicated machine learning functions such as exploratory data analysis, data pre-processing, feature engineering, model training, model validation, model tuning and model selection.

This package automates the following steps on any input dataset for machine learning classification problems

  1. Data cleaning
    • Replacing NA, infinite values
    • Removing duplicates
    • Cleaning feature names
  2. Feature engineering
    • Missing at random features
    • Missing variable imputation
    • Outlier treatment - Outlier flag and imputation with 5th or 95th percentile value
    • Date variable transformation
    • Bulk interactions for numerical features
    • Frequent transformer for categorical features
    • Categorical feature engineering - one hot encoding
    • Feature selection using zero variance, correlation and AUC method
  3. Binary classification - Model training and validation
    • Automated test and validation set creations
    • Hyperparameter tuning using random search
    • Multiple binary classification algorithms like logistic regression, randomForest, xgboost, glmnet, rpart
    • Model validation using AUC value
    • Model plots like training and testing ROC curve, threshold plot
    • Probability scores and model objects
  4. Model Explanation
    • Lift plot
    • Partial dependence plot
    • Feature importance plot
  5. Model report
    • model output in rmarkdown html format

Additionally, we are providing a function SmartEDA for Exploratory data analysis that generates automated EDA report in HTML format to understand the distributions of the data. Please note there are some dependencies on some other R packages such as MLR, caret, data.table, ggplot2, etc. for some specific task.

To summarize, DriveML package helps in getting the complete Machine learning classification model just by running the function instead of writing lengthy r code.

Missing not at random features

Algorithm: Missing at random features

  1. Select all the missing features X_i where i=1,2,…..,N.
  2. For i=1 to N:
    • Define Y_i, which will have value of 1 if X_i has a missing value, 0 if X_i is not having missing value
    • Impute all X_(i+1 ) 〖to X〗_(N ) variables using imputation method
    • Fit binary classifier f_m to the training data using Y_i ~ X_(i+1 ) 〖+⋯+ X〗_(N )
    • Calculate AUC ∝_ivalue between actual Y_i and predicted Y ̂_i
    • If ∝_i is low then the missing values in X_i are missing at random,Y_i to be dropped
    • Repeat steps 1 to 4 for all the independent variables in the original dataset

2. Functionalities of DriveML

The DriveML R package has three unique functions

  1. Data Pre-processing and Data Preparation
    • autoDataPrep function to generate a novel features based on the functional understanding of the dataset
  2. Building Machine Learning Models
    • autoMLmodel function to develop baseline machine learning models using regression and tree based classification techniques
  3. Generating Model Report
    • autoMLReport function to print the machine learning model outcome in HTML format

3. Machine learning classfication model use-case using DriveML

About the dataset

This database contains 76 attributes, but all published experiments refer to using a subset of 14 of them. In particular, the Cleveland database is the only one that has been used by ML researchers to this date. The “goal” field refers to the presence of heart disease in the patient. It is integer valued from 0 (no presence) to 4.

Data Source https://archive.ics.uci.edu/ml/datasets/Heart+Disease

Install the package “DriveML” to get the example data set.

library("DriveML")
library("SmartEDA")
## Load sample dataset from ISLR pacakge
data(heart)

more detailed attribute information is there in DriveML help page

3.1 Data Exploration

For data exploratory analysis used SmartEDA package

Overview of the data

Understanding the dimensions of the dataset, variable names, overall missing summary and data types of each variables

# Overview of the data - Type = 1
ExpData(data=heart,type=1)

# Structure of the data - Type = 2
ExpData(data=heart,type=2)
  • Overview of the data
    Descriptions Value
    Sample size (nrow) 303
    No. of variables (ncol) 14
    No. of numeric/interger variables 14
    No. of factor variables 0
    No. of text variables 0
    No. of logical variables 0
    No. of identifier variables 0
    No. of date variables 0
    No. of zero variance variables (uniform) 0
    %. of variables having complete cases 100% (14)
    %. of variables having >0% and <50% missing cases 0% (0)
    %. of variables having >=50% and <90% missing cases 0% (0)
    %. of variables having >=90% missing cases 0% (0)
  • Structure of the data
Index Variable_Name Variable_Type Sample_n Missing_Count Per_of_Missing No_of_distinct_values
1 age integer 303 0 0 41
2 sex integer 303 0 0 2
3 cp integer 303 0 0 4
4 trestbps integer 303 0 0 49
5 chol integer 303 0 0 152
6 fbs integer 303 0 0 2
7 restecg integer 303 0 0 3
8 thalach integer 303 0 0 91
9 exang integer 303 0 0 2
10 oldpeak numeric 303 0 0 40
11 slope integer 303 0 0 3
12 ca integer 303 0 0 5
13 thal integer 303 0 0 4
14 target_var integer 303 0 0 2

Summary of numerical variables

ExpNumStat(heart,by="GA",gp="target_var",Qnt=seq(0,1,0.1),MesofShape=2,Outlier=TRUE,round=2)

Distributions of Numerical variables

Box plots for all numerical variables vs categorical dependent variable - Bivariate comparison only with classes

Boxplot for all the numerical attributes by each class of the target variable

plot4 <- ExpNumViz(heart,target="target_var",type=1,nlim=3,fname=NULL,Page=c(2,2),sample=8)
plot4[[1]]

Summary of categorical variables

Cross tabulation with target_var variable

Custom tables between all categorical independent variables and the target variable

ExpCTable(Carseats,Target="Urban",margin=1,clim=10,nlim=3,round=2,bin=NULL,per=F)
VARIABLE CATEGORY target_var:0 target_var:1 TOTAL
sex 0 24 72 96
sex 1 114 93 207
sex TOTAL 138 165 303
fbs 0 116 142 258
fbs 1 22 23 45
fbs TOTAL 138 165 303
restecg 0 79 68 147
restecg 1 56 96 152
restecg 2 3 1 4
restecg TOTAL 138 165 303
exang 0 62 142 204
exang 1 76 23 99
exang TOTAL 138 165 303
slope 0 12 9 21
slope 1 91 49 140
slope 2 35 107 142
slope TOTAL 138 165 303
target_var 0 138 0 138
target_var 1 0 165 165
target_var TOTAL 138 165 303

Distributions of categorical variables

Stacked bar plot with vertical or horizontal bars for all categorical variables

plot5 <- ExpCatViz(heart,target = "target_var", fname = NULL, clim=5,col=c("slateblue4","slateblue1"),margin=2,Page = c(2,1),sample=2)
plot5[[1]]

Outlier analysis using boxplot

ExpOutliers(heart, varlist = c("oldpeak","trestbps","chol"), method = "boxplot",  treatment = "mean", capping = c(0.1, 0.9))
Category oldpeak trestbps chol
Lower cap : 0.1 0 110 188
Upper cap : 0.9 2.8 152 308.8
Lower bound -2.4 90 115.75
Upper bound 4 170 369.75
Num of outliers 5 9 5
Lower outlier case
Upper outlier case 102,205,222,251,292 9,102,111,204,224,242,249,261,267 29,86,97,221,247
Mean before 1.04 131.62 246.26
Mean after 0.97 130.1 243.04
Median before 0.8 130 240
Median after 0.65 130 240

3.2 Data preparations using autoDataprep

dateprep <- autoDataprep(data = heart, 
                         target = 'target_var',
                         missimpute = 'default',
                         auto_mar = FALSE,
                             mar_object = NULL,
                             dummyvar = TRUE,
                             char_var_limit = 15,
                             aucv = 0.002,
                             corr = 0.98,
                             outlier_flag = TRUE,
                             uid = NULL,
                             onlykeep = NULL,
                             drop = NULL)

print(dateprep)
## $call
## autoDataprep(data = heart, target = "target_var", missimpute = "default", 
##     auto_mar = FALSE, mar_object = NULL, dummyvar = TRUE, char_var_limit = 15, 
##     aucv = 0.002, corr = 0.98, outlier_flag = TRUE, uid = NULL, 
##     onlykeep = NULL, drop = NULL)
## 
## $datasummary
## $datasummary$type1
##                                           Descriptions     Value
## 1                                   Sample size (nrow)       303
## 2                              No. of variables (ncol)        14
## 3                    No. of numeric/interger variables        14
## 4                              No. of factor variables         0
## 5                                No. of text variables         0
## 6                             No. of logical variables         0
## 7                          No. of identifier variables         0
## 8                                No. of date variables         0
## 9             No. of zero variance variables (uniform)         0
## 10               %. of variables having complete cases 100% (14)
## 11   %. of variables having >0% and <50% missing cases    0% (0)
## 12 %. of variables having >=50% and <90% missing cases    0% (0)
## 13          %. of variables having >=90% missing cases    0% (0)
## 
## $datasummary$type2
##    Index Variable_Name Variable_Type Sample_n Missing_Count Per_of_Missing
## 1      1           age       integer      303             0              0
## 2      2           sex       integer      303             0              0
## 3      3            cp       integer      303             0              0
## 4      4      trestbps       integer      303             0              0
## 5      5          chol       integer      303             0              0
## 6      6           fbs       integer      303             0              0
## 7      7       restecg       integer      303             0              0
## 8      8       thalach       integer      303             0              0
## 9      9         exang       integer      303             0              0
## 10    10       oldpeak       numeric      303             0              0
## 11    11         slope       integer      303             0              0
## 12    12            ca       integer      303             0              0
## 13    13          thal       integer      303             0              0
## 14    14    target_var       integer      303             0              0
##    No_of_distinct_values
## 1                     41
## 2                      2
## 3                      4
## 4                     49
## 5                    152
## 6                      2
## 7                      3
## 8                     91
## 9                      2
## 10                    40
## 11                     3
## 12                     5
## 13                     4
## 14                     2
## 
## 
## $complete_data
##     target_var sex fbs restecg exang slope age cp trestbps chol thalach oldpeak
## 1            1   1   1       0     0     0  63  3      145  233     150     2.3
## 2            1   1   0       1     0     0  37  2      130  250     187     3.5
## 3            1   0   0       0     0     2  41  1      130  204     172     1.4
## 4            1   1   0       1     0     2  56  1      120  236     178     0.8
## 5            1   0   0       1     1     2  57  0      120  354     163     0.6
## 6            1   1   0       1     0     1  57  0      140  192     148     0.4
## 7            1   0   0       0     0     1  56  1      140  294     153     1.3
## 8            1   1   0       1     0     2  44  1      120  263     173     0.0
## 9            1   1   1       1     0     2  52  2      172  199     162     0.5
## 10           1   1   0       1     0     2  57  2      150  168     174     1.6
## 11           1   1   0       1     0     2  54  0      140  239     160     1.2
## 12           1   0   0       1     0     2  48  2      130  275     139     0.2
## 13           1   1   0       1     0     2  49  1      130  266     171     0.6
## 14           1   1   0       0     1     1  64  3      110  211     144     1.8
## 15           1   0   1       0     0     2  58  3      150  283     162     1.0
## 16           1   0   0       1     0     1  50  2      120  219     158     1.6
## 17           1   0   0       1     0     2  58  2      120  340     172     0.0
## 18           1   0   0       1     0     0  66  3      150  226     114     2.6
## 19           1   1   0       1     0     2  43  0      150  247     171     1.5
## 20           1   0   0       1     0     2  69  3      140  239     151     1.8
## 21           1   1   0       1     0     1  59  0      135  234     161     0.5
## 22           1   1   0       1     1     2  44  2      130  233     179     0.4
## 23           1   1   0       1     0     2  42  0      140  226     178     0.0
## 24           1   1   1       1     1     1  61  2      150  243     137     1.0
## 25           1   1   0       1     1     2  40  3      140  199     178     1.4
## 26           1   0   0       1     0     2  71  1      160  302     162     0.4
## 27           1   1   1       1     0     2  59  2      150  212     157     1.6
## 28           1   1   0       1     0     2  51  2      110  175     123     0.6
## 29           1   0   1       0     0     2  65  2      140  417     157     0.8
## 30           1   1   1       0     0     0  53  2      130  197     152     1.2
## 31           1   0   0       1     0     2  41  1      105  198     168     0.0
## 32           1   1   0       1     0     2  65  0      120  177     140     0.4
## 33           1   1   0       0     0     2  44  1      130  219     188     0.0
## 34           1   1   0       0     0     0  54  2      125  273     152     0.5
## 35           1   1   0       0     1     2  51  3      125  213     125     1.4
## 36           1   0   0       0     1     0  46  2      142  177     160     1.4
## 37           1   0   1       1     0     2  54  2      135  304     170     0.0
## 38           1   1   0       0     0     2  54  2      150  232     165     1.6
## 39           1   0   0       1     0     2  65  2      155  269     148     0.8
## 40           1   0   0       0     0     2  65  2      160  360     151     0.8
## 41           1   0   0       0     0     2  51  2      140  308     142     1.5
## 42           1   1   0       0     0     1  48  1      130  245     180     0.2
## 43           1   1   0       0     1     1  45  0      104  208     148     3.0
## 44           1   0   0       0     0     1  53  0      130  264     143     0.4
## 45           1   1   0       0     0     2  39  2      140  321     182     0.0
## 46           1   1   0       1     0     2  52  1      120  325     172     0.2
## 47           1   1   0       0     0     2  44  2      140  235     180     0.0
## 48           1   1   0       0     0     2  47  2      138  257     156     0.0
## 49           1   0   0       0     0     2  53  2      128  216     115     0.0
## 50           1   0   0       0     0     2  53  0      138  234     160     0.0
## 51           1   0   0       0     0     2  51  2      130  256     149     0.5
## 52           1   1   0       0     0     1  66  0      120  302     151     0.4
## 53           1   1   0       1     0     1  62  2      130  231     146     1.8
## 54           1   0   0       1     0     1  44  2      108  141     175     0.6
## 55           1   0   0       0     0     2  63  2      135  252     172     0.0
## 56           1   1   0       1     0     2  52  1      134  201     158     0.8
## 57           1   1   0       0     0     2  48  0      122  222     186     0.0
## 58           1   1   0       0     0     2  45  0      115  260     185     0.0
## 59           1   1   0       0     0     2  34  3      118  182     174     0.0
## 60           1   0   0       0     0     2  57  0      128  303     159     0.0
## 61           1   0   1       0     0     2  71  2      110  265     130     0.0
## 62           1   1   0       1     0     2  54  1      108  309     156     0.0
## 63           1   1   0       0     0     1  52  3      118  186     190     0.0
## 64           1   1   0       1     0     1  41  1      135  203     132     0.0
## 65           1   1   1       0     0     2  58  2      140  211     165     0.0
## 66           1   0   0       1     0     2  35  0      138  183     182     1.4
## 67           1   1   0       1     1     1  51  2      100  222     143     1.2
## 68           1   0   0       0     0     1  45  1      130  234     175     0.6
## 69           1   1   0       1     0     2  44  1      120  220     170     0.0
## 70           1   0   0       1     0     2  62  0      124  209     163     0.0
## 71           1   1   0       0     0     1  54  2      120  258     147     0.4
## 72           1   1   0       1     1     2  51  2       94  227     154     0.0
## 73           1   1   0       0     0     2  29  1      130  204     202     0.0
## 74           1   1   0       0     1     2  51  0      140  261     186     0.0
## 75           1   0   0       1     0     1  43  2      122  213     165     0.2
## 76           1   0   0       0     0     1  55  1      135  250     161     1.4
## 77           1   1   1       0     0     1  51  2      125  245     166     2.4
## 78           1   1   0       1     1     2  59  1      140  221     164     0.0
## 79           1   1   1       1     0     2  52  1      128  205     184     0.0
## 80           1   1   0       0     1     1  58  2      105  240     154     0.6
## 81           1   1   0       1     0     2  41  2      112  250     179     0.0
## 82           1   1   0       0     0     2  45  1      128  308     170     0.0
## 83           1   0   0       1     0     2  60  2      102  318     160     0.0
## 84           1   1   1       1     0     1  52  3      152  298     178     1.2
## 85           1   0   0       0     0     1  42  0      102  265     122     0.6
## 86           1   0   0       0     0     1  67  2      115  564     160     1.6
## 87           1   1   0       1     0     2  68  2      118  277     151     1.0
## 88           1   1   1       1     0     2  46  1      101  197     156     0.0
## 89           1   0   0       1     0     1  54  2      110  214     158     1.6
## 90           1   0   0       0     0     1  58  0      100  248     122     1.0
## 91           1   1   1       1     0     2  48  2      124  255     175     0.0
## 92           1   1   0       1     1     2  57  0      132  207     168     0.0
## 93           1   1   0       1     0     2  52  2      138  223     169     0.0
## 94           1   0   1       0     1     2  54  1      132  288     159     0.0
## 95           1   0   0       1     0     1  45  1      112  160     138     0.0
## 96           1   1   0       0     1     2  53  0      142  226     111     0.0
## 97           1   0   0       0     0     1  62  0      140  394     157     1.2
## 98           1   1   1       1     0     2  52  0      108  233     147     0.1
## 99           1   1   0       1     0     2  43  2      130  315     162     1.9
## 100          1   1   1       0     0     2  53  2      130  246     173     0.0
## 101          1   1   0       0     0     2  42  3      148  244     178     0.8
## 102          1   1   0       0     0     0  59  3      178  270     145     4.2
## 103          1   0   0       1     0     2  63  1      140  195     179     0.0
## 104          1   1   1       1     0     0  42  2      120  240     194     0.8
## 105          1   1   0       1     0     2  50  2      129  196     163     0.0
## 106          1   0   0       0     0     1  68  2      120  211     115     1.5
## 107          1   1   1       0     0     1  69  3      160  234     131     0.1
## 108          1   0   0       0     1     1  45  0      138  236     152     0.2
## 109          1   0   0       1     0     2  50  1      120  244     162     1.1
## 110          1   0   0       0     0     2  50  0      110  254     159     0.0
## 111          1   0   0       1     1     2  64  0      180  325     154     0.0
## 112          1   1   1       1     0     2  57  2      150  126     173     0.2
## 113          1   0   0       1     0     2  64  2      140  313     133     0.2
## 114          1   1   0       1     0     2  43  0      110  211     161     0.0
## 115          1   1   0       1     0     2  55  1      130  262     155     0.0
## 116          1   0   0       1     0     2  37  2      120  215     170     0.0
## 117          1   1   0       0     0     1  41  2      130  214     168     2.0
## 118          1   1   0       0     0     1  56  3      120  193     162     1.9
## 119          1   0   0       1     0     2  46  1      105  204     172     0.0
## 120          1   0   0       0     1     1  46  0      138  243     152     0.0
## 121          1   0   0       1     0     1  64  0      130  303     122     2.0
## 122          1   1   0       0     0     2  59  0      138  271     182     0.0
## 123          1   0   0       0     1     2  41  2      112  268     172     0.0
## 124          1   0   0       0     0     2  54  2      108  267     167     0.0
## 125          1   0   0       1     0     2  39  2       94  199     179     0.0
## 126          1   0   0       1     0     2  34  1      118  210     192     0.7
## 127          1   1   0       1     0     2  47  0      112  204     143     0.1
## 128          1   0   0       1     0     2  67  2      152  277     172     0.0
## 129          1   0   0       0     0     1  52  2      136  196     169     0.1
## 130          1   0   0       0     1     2  74  1      120  269     121     0.2
## 131          1   0   0       1     0     2  54  2      160  201     163     0.0
## 132          1   0   0       1     0     1  49  1      134  271     162     0.0
## 133          1   1   0       1     0     2  42  1      120  295     162     0.0
## 134          1   1   0       1     0     2  41  1      110  235     153     0.0
## 135          1   0   0       1     0     2  41  1      126  306     163     0.0
## 136          1   0   0       1     0     2  49  0      130  269     163     0.0
## 137          1   0   1       1     0     2  60  2      120  178      96     0.0
## 138          1   1   1       0     0     2  62  1      128  208     140     0.0
## 139          1   1   0       1     1     1  57  0      110  201     126     1.5
## 140          1   1   0       1     1     1  64  0      128  263     105     0.2
## 141          1   0   0       0     0     2  51  2      120  295     157     0.6
## 142          1   1   0       1     0     1  43  0      115  303     181     1.2
## 143          1   0   0       1     0     1  42  2      120  209     173     0.0
## 144          1   0   0       1     0     2  67  0      106  223     142     0.3
## 145          1   0   0       2     0     1  76  2      140  197     116     1.1
## 146          1   1   0       0     0     2  70  1      156  245     143     0.0
## 147          1   0   0       1     0     1  44  2      118  242     149     0.3
## 148          1   0   0       1     0     2  60  3      150  240     171     0.9
## 149          1   1   0       1     0     2  44  2      120  226     169     0.0
## 150          1   1   0       1     0     2  42  2      130  180     150     0.0
## 151          1   1   0       0     0     2  66  0      160  228     138     2.3
## 152          1   0   0       1     0     1  71  0      112  149     125     1.6
## 153          1   1   0       0     0     1  64  3      170  227     155     0.6
## 154          1   0   0       0     0     1  66  2      146  278     152     0.0
## 155          1   0   0       1     0     1  39  2      138  220     152     0.0
## 156          1   0   0       1     0     1  58  0      130  197     131     0.6
## 157          1   1   0       1     0     2  47  2      130  253     179     0.0
## 158          1   1   0       1     0     2  35  1      122  192     174     0.0
## 159          1   1   0       1     0     1  58  1      125  220     144     0.4
## 160          1   1   0       0     0     2  56  1      130  221     163     0.0
## 161          1   1   0       1     0     0  56  1      120  240     169     0.0
## 162          1   0   0       1     0     2  55  1      132  342     166     1.2
## 163          1   1   0       1     0     2  41  1      120  157     182     0.0
## 164          1   1   0       1     0     2  38  2      138  175     173     0.0
## 165          1   1   0       1     0     2  38  2      138  175     173     0.0
## 166          0   1   0       0     1     1  67  0      160  286     108     1.5
## 167          0   1   0       0     1     1  67  0      120  229     129     2.6
## 168          0   0   0       0     0     0  62  0      140  268     160     3.6
## 169          0   1   0       0     0     1  63  0      130  254     147     1.4
## 170          0   1   1       0     1     0  53  0      140  203     155     3.1
## 171          0   1   1       0     1     1  56  2      130  256     142     0.6
## 172          0   1   0       1     0     0  48  1      110  229     168     1.0
## 173          0   1   0       0     0     1  58  1      120  284     160     1.8
## 174          0   1   0       0     0     2  58  2      132  224     173     3.2
## 175          0   1   0       0     1     1  60  0      130  206     132     2.4
## 176          0   1   0       0     1     1  40  0      110  167     114     2.0
## 177          0   1   1       1     1     2  60  0      117  230     160     1.4
## 178          0   1   0       1     0     2  64  2      140  335     158     0.0
## 179          0   1   0       0     1     1  43  0      120  177     120     2.5
## 180          0   1   0       0     1     1  57  0      150  276     112     0.6
## 181          0   1   0       1     1     1  55  0      132  353     132     1.2
## 182          0   0   0       0     0     1  65  0      150  225     114     1.0
## 183          0   0   0       0     0     2  61  0      130  330     169     0.0
## 184          0   1   0       0     0     1  58  2      112  230     165     2.5
## 185          0   1   0       0     0     1  50  0      150  243     128     2.6
## 186          0   1   0       0     0     2  44  0      112  290     153     0.0
## 187          0   1   0       1     1     2  60  0      130  253     144     1.4
## 188          0   1   0       0     1     1  54  0      124  266     109     2.2
## 189          0   1   0       1     0     1  50  2      140  233     163     0.6
## 190          0   1   0       0     0     2  41  0      110  172     158     0.0
## 191          0   0   0       1     1     1  51  0      130  305     142     1.2
## 192          0   1   0       0     1     1  58  0      128  216     131     2.2
## 193          0   1   0       1     0     1  54  0      120  188     113     1.4
## 194          0   1   0       0     1     1  60  0      145  282     142     2.8
## 195          0   1   0       0     0     1  60  2      140  185     155     3.0
## 196          0   1   0       0     1     0  59  0      170  326     140     3.4
## 197          0   1   0       1     0     1  46  2      150  231     147     3.6
## 198          0   1   1       1     0     1  67  0      125  254     163     0.2
## 199          0   1   0       1     1     1  62  0      120  267      99     1.8
## 200          0   1   0       0     0     2  65  0      110  248     158     0.6
## 201          0   1   0       0     0     2  44  0      110  197     177     0.0
## 202          0   1   0       0     1     1  60  0      125  258     141     2.8
## 203          0   1   0       0     1     2  58  0      150  270     111     0.8
## 204          0   1   1       0     1     1  68  2      180  274     150     1.6
## 205          0   0   0       0     0     0  62  0      160  164     145     6.2
## 206          0   1   0       1     1     2  52  0      128  255     161     0.0
## 207          0   1   0       0     1     1  59  0      110  239     142     1.2
## 208          0   0   0       0     0     1  60  0      150  258     157     2.6
## 209          0   1   0       1     0     1  49  2      120  188     139     2.0
## 210          0   1   0       1     1     2  59  0      140  177     162     0.0
## 211          0   1   0       0     0     1  57  2      128  229     150     0.4
## 212          0   1   0       1     1     1  61  0      120  260     140     3.6
## 213          0   1   0       1     0     1  39  0      118  219     140     1.2
## 214          0   0   0       0     1     1  61  0      145  307     146     1.0
## 215          0   1   1       0     1     1  56  0      125  249     144     1.2
## 216          0   0   1       0     1     1  43  0      132  341     136     3.0
## 217          0   0   0       1     0     1  62  2      130  263      97     1.2
## 218          0   1   1       0     1     2  63  0      130  330     132     1.8
## 219          0   1   0       0     0     1  65  0      135  254     127     2.8
## 220          0   1   1       0     1     2  48  0      130  256     150     0.0
## 221          0   0   0       0     0     1  63  0      150  407     154     4.0
## 222          0   1   0       1     1     0  55  0      140  217     111     5.6
## 223          0   1   1       0     0     1  65  3      138  282     174     1.4
## 224          0   0   1       0     1     0  56  0      200  288     133     4.0
## 225          0   1   0       1     1     1  54  0      110  239     126     2.8
## 226          0   1   0       1     1     0  70  0      145  174     125     2.6
## 227          0   1   0       0     0     1  62  1      120  281     103     1.4
## 228          0   1   0       1     1     1  35  0      120  198     130     1.6
## 229          0   1   0       0     0     1  59  3      170  288     159     0.2
## 230          0   1   0       1     1     1  64  2      125  309     131     1.8
## 231          0   1   0       1     0     2  47  2      108  243     152     0.0
## 232          0   1   1       0     0     1  57  0      165  289     124     1.0
## 233          0   1   0       0     1     1  55  0      160  289     145     0.8
## 234          0   1   0       0     1     0  64  0      120  246      96     2.2
## 235          0   1   0       0     0     1  70  0      130  322     109     2.4
## 236          0   1   0       1     1     2  51  0      140  299     173     1.6
## 237          0   1   0       0     0     2  58  0      125  300     171     0.0
## 238          0   1   0       0     0     1  60  0      140  293     170     1.2
## 239          0   1   0       0     1     2  77  0      125  304     162     0.0
## 240          0   1   0       0     1     2  35  0      126  282     156     0.0
## 241          0   1   0       1     1     1  70  2      160  269     112     2.9
## 242          0   0   0       1     1     1  59  0      174  249     143     0.0
## 243          0   1   0       0     0     1  64  0      145  212     132     2.0
## 244          0   1   0       1     1     1  57  0      152  274      88     1.2
## 245          0   1   0       0     1     1  56  0      132  184     105     2.1
## 246          0   1   0       0     0     1  48  0      124  274     166     0.5
## 247          0   0   0       0     1     1  56  0      134  409     150     1.9
## 248          0   1   0       1     1     1  66  1      160  246     120     0.0
## 249          0   1   0       0     0     2  54  1      192  283     195     0.0
## 250          0   1   0       0     0     1  69  2      140  254     146     2.0
## 251          0   1   0       1     1     1  51  0      140  298     122     4.2
## 252          0   1   1       0     1     1  43  0      132  247     143     0.1
## 253          0   0   1       1     0     1  62  0      138  294     106     1.9
## 254          0   1   0       0     1     1  67  0      100  299     125     0.9
## 255          0   1   0       0     0     2  59  3      160  273     125     0.0
## 256          0   1   0       0     1     1  45  0      142  309     147     0.0
## 257          0   1   0       0     1     1  58  0      128  259     130     3.0
## 258          0   1   0       0     1     1  50  0      144  200     126     0.9
## 259          0   0   0       1     1     1  62  0      150  244     154     1.4
## 260          0   1   0       1     1     1  38  3      120  231     182     3.8
## 261          0   0   1       1     1     1  66  0      178  228     165     1.0
## 262          0   1   0       1     0     2  52  0      112  230     160     0.0
## 263          0   1   0       1     1     1  53  0      123  282      95     2.0
## 264          0   0   0       1     1     1  63  0      108  269     169     1.8
## 265          0   1   0       0     1     1  54  0      110  206     108     0.0
## 266          0   1   0       0     1     2  66  0      112  212     132     0.1
## 267          0   0   0       2     1     1  55  0      180  327     117     3.4
## 268          0   1   0       0     0     2  49  2      118  149     126     0.8
## 269          0   1   0       0     1     1  54  0      122  286     116     3.2
## 270          0   1   1       0     1     0  56  0      130  283     103     1.6
## 271          0   1   0       0     0     2  46  0      120  249     144     0.8
## 272          0   1   0       1     0     1  61  3      134  234     145     2.6
## 273          0   1   0       1     0     1  67  0      120  237      71     1.0
## 274          0   1   0       1     0     2  58  0      100  234     156     0.1
## 275          0   1   0       0     1     1  47  0      110  275     118     1.0
## 276          0   1   0       1     0     2  52  0      125  212     168     1.0
## 277          0   1   0       1     0     1  58  0      146  218     105     2.0
## 278          0   1   0       1     0     2  57  1      124  261     141     0.3
## 279          0   0   1       0     0     2  58  1      136  319     152     0.0
## 280          0   1   0       0     1     1  61  0      138  166     125     3.6
## 281          0   1   0       1     1     1  42  0      136  315     125     1.8
## 282          0   1   1       1     1     1  52  0      128  204     156     1.0
## 283          0   1   1       1     0     1  59  2      126  218     134     2.2
## 284          0   1   0       1     0     2  40  0      152  223     181     0.0
## 285          0   1   0       0     1     2  61  0      140  207     138     1.9
## 286          0   1   0       1     1     1  46  0      140  311     120     1.8
## 287          0   1   0       1     0     2  59  3      134  204     162     0.8
## 288          0   1   0       0     0     2  57  1      154  232     164     0.0
## 289          0   1   0       1     1     1  57  0      110  335     143     3.0
## 290          0   0   0       2     1     1  55  0      128  205     130     2.0
## 291          0   1   0       1     0     2  61  0      148  203     161     0.0
## 292          0   1   0       2     0     0  58  0      114  318     140     4.4
## 293          0   0   1       0     1     1  58  0      170  225     146     2.8
## 294          0   1   0       0     0     1  67  2      152  212     150     0.8
## 295          0   1   0       1     1     0  44  0      120  169     144     2.8
## 296          0   1   0       0     1     2  63  0      140  187     144     4.0
## 297          0   0   0       1     1     1  63  0      124  197     136     0.0
## 298          0   1   1       0     0     1  59  0      164  176      90     1.0
## 299          0   0   0       1     1     1  57  0      140  241     123     0.2
## 300          0   1   0       1     0     1  45  3      110  264     132     1.2
## 301          0   1   1       1     0     1  68  0      144  193     141     3.4
## 302          0   1   0       1     1     1  57  0      130  131     115     1.2
## 303          0   0   0       0     0     1  57  1      130  236     174     0.0
##     ca thal Out_flag_trestbps Out_flag_chol Out_flag_thalach Out_flag_oldpeak
## 1    0    1                 0             0                0                0
## 2    0    2                 0             0                0                0
## 3    0    2                 0             0                0                0
## 4    0    2                 0             0                0                0
## 5    0    2                 0             0                0                0
## 6    0    1                 0             0                0                0
## 7    0    2                 0             0                0                0
## 8    0    3                 0             0                0                0
## 9    0    3                 1             0                0                0
## 10   0    2                 0             0                0                0
## 11   0    2                 0             0                0                0
## 12   0    2                 0             0                0                0
## 13   0    2                 0             0                0                0
## 14   0    2                 0             0                0                0
## 15   0    2                 0             0                0                0
## 16   0    2                 0             0                0                0
## 17   0    2                 0             0                0                0
## 18   0    2                 0             0                0                0
## 19   0    2                 0             0                0                0
## 20   2    2                 0             0                0                0
## 21   0    3                 0             0                0                0
## 22   0    2                 0             0                0                0
## 23   0    2                 0             0                0                0
## 24   0    2                 0             0                0                0
## 25   0    3                 0             0                0                0
## 26   2    2                 0             0                0                0
## 27   0    2                 0             0                0                0
## 28   0    2                 0             0                0                0
## 29   1    2                 0             1                0                0
## 30   0    2                 0             0                0                0
## 31   1    2                 0             0                0                0
## 32   0    3                 0             0                0                0
## 33   0    2                 0             0                0                0
## 34   1    2                 0             0                0                0
## 35   1    2                 0             0                0                0
## 36   0    2                 0             0                0                0
## 37   0    2                 0             0                0                0
## 38   0    3                 0             0                0                0
## 39   0    2                 0             0                0                0
## 40   0    2                 0             0                0                0
## 41   1    2                 0             0                0                0
## 42   0    2                 0             0                0                0
## 43   0    2                 0             0                0                0
## 44   0    2                 0             0                0                0
## 45   0    2                 0             0                0                0
## 46   0    2                 0             0                0                0
## 47   0    2                 0             0                0                0
## 48   0    2                 0             0                0                0
## 49   0    0                 0             0                0                0
## 50   0    2                 0             0                0                0
## 51   0    2                 0             0                0                0
## 52   0    2                 0             0                0                0
## 53   3    3                 0             0                0                0
## 54   0    2                 0             0                0                0
## 55   0    2                 0             0                0                0
## 56   1    2                 0             0                0                0
## 57   0    2                 0             0                0                0
## 58   0    2                 0             0                0                0
## 59   0    2                 0             0                0                0
## 60   1    2                 0             0                0                0
## 61   1    2                 0             0                0                0
## 62   0    3                 0             0                0                0
## 63   0    1                 0             0                0                0
## 64   0    1                 0             0                0                0
## 65   0    2                 0             0                0                0
## 66   0    2                 0             0                0                0
## 67   0    2                 0             0                0                0
## 68   0    2                 0             0                0                0
## 69   0    2                 0             0                0                0
## 70   0    2                 0             0                0                0
## 71   0    3                 0             0                0                0
## 72   1    3                 0             0                0                0
## 73   0    2                 0             0                0                0
## 74   0    2                 0             0                0                0
## 75   0    2                 0             0                0                0
## 76   0    2                 0             0                0                0
## 77   0    2                 0             0                0                0
## 78   0    2                 0             0                0                0
## 79   0    2                 0             0                0                0
## 80   0    3                 0             0                0                0
## 81   0    2                 0             0                0                0
## 82   0    2                 0             0                0                0
## 83   1    2                 0             0                0                0
## 84   0    3                 0             0                0                0
## 85   0    2                 0             0                0                0
## 86   0    3                 0             1                0                0
## 87   1    3                 0             0                0                0
## 88   0    3                 0             0                0                0
## 89   0    2                 0             0                0                0
## 90   0    2                 0             0                0                0
## 91   2    2                 0             0                0                0
## 92   0    3                 0             0                0                0
## 93   4    2                 0             0                0                0
## 94   1    2                 0             0                0                0
## 95   0    2                 0             0                0                0
## 96   0    3                 0             0                0                0
## 97   0    2                 0             1                0                0
## 98   3    3                 0             0                0                0
## 99   1    2                 0             0                0                0
## 100  3    2                 0             0                0                0
## 101  2    2                 0             0                0                0
## 102  0    3                 1             0                0                1
## 103  2    2                 0             0                0                0
## 104  0    3                 0             0                0                0
## 105  0    2                 0             0                0                0
## 106  0    2                 0             0                0                0
## 107  1    2                 0             0                0                0
## 108  0    2                 0             0                0                0
## 109  0    2                 0             0                0                0
## 110  0    2                 0             0                0                0
## 111  0    2                 1             0                0                0
## 112  1    3                 0             0                0                0
## 113  0    3                 0             0                0                0
## 114  0    3                 0             0                0                0
## 115  0    2                 0             0                0                0
## 116  0    2                 0             0                0                0
## 117  0    2                 0             0                0                0
## 118  0    3                 0             0                0                0
## 119  0    2                 0             0                0                0
## 120  0    2                 0             0                0                0
## 121  2    2                 0             0                0                0
## 122  0    2                 0             0                0                0
## 123  0    2                 0             0                0                0
## 124  0    2                 0             0                0                0
## 125  0    2                 0             0                0                0
## 126  0    2                 0             0                0                0
## 127  0    2                 0             0                0                0
## 128  1    2                 0             0                0                0
## 129  0    2                 0             0                0                0
## 130  1    2                 0             0                0                0
## 131  1    2                 0             0                0                0
## 132  0    2                 0             0                0                0
## 133  0    2                 0             0                0                0
## 134  0    2                 0             0                0                0
## 135  0    2                 0             0                0                0
## 136  0    2                 0             0                0                0
## 137  0    2                 0             0                0                0
## 138  0    2                 0             0                0                0
## 139  0    1                 0             0                0                0
## 140  1    3                 0             0                0                0
## 141  0    2                 0             0                0                0
## 142  0    2                 0             0                0                0
## 143  0    2                 0             0                0                0
## 144  2    2                 0             0                0                0
## 145  0    2                 0             0                0                0
## 146  0    2                 0             0                0                0
## 147  1    2                 0             0                0                0
## 148  0    2                 0             0                0                0
## 149  0    2                 0             0                0                0
## 150  0    2                 0             0                0                0
## 151  0    1                 0             0                0                0
## 152  0    2                 0             0                0                0
## 153  0    3                 0             0                0                0
## 154  1    2                 0             0                0                0
## 155  0    2                 0             0                0                0
## 156  0    2                 0             0                0                0
## 157  0    2                 0             0                0                0
## 158  0    2                 0             0                0                0
## 159  4    3                 0             0                0                0
## 160  0    3                 0             0                0                0
## 161  0    2                 0             0                0                0
## 162  0    2                 0             0                0                0
## 163  0    2                 0             0                0                0
## 164  4    2                 0             0                0                0
## 165  4    2                 0             0                0                0
## 166  3    2                 0             0                0                0
## 167  2    3                 0             0                0                0
## 168  2    2                 0             0                0                0
## 169  1    3                 0             0                0                0
## 170  0    3                 0             0                0                0
## 171  1    1                 0             0                0                0
## 172  0    3                 0             0                0                0
## 173  0    2                 0             0                0                0
## 174  2    3                 0             0                0                0
## 175  2    3                 0             0                0                0
## 176  0    3                 0             0                0                0
## 177  2    3                 0             0                0                0
## 178  0    2                 0             0                0                0
## 179  0    3                 0             0                0                0
## 180  1    1                 0             0                0                0
## 181  1    3                 0             0                0                0
## 182  3    3                 0             0                0                0
## 183  0    2                 0             0                0                0
## 184  1    3                 0             0                0                0
## 185  0    3                 0             0                0                0
## 186  1    2                 0             0                0                0
## 187  1    3                 0             0                0                0
## 188  1    3                 0             0                0                0
## 189  1    3                 0             0                0                0
## 190  0    3                 0             0                0                0
## 191  0    3                 0             0                0                0
## 192  3    3                 0             0                0                0
## 193  1    3                 0             0                0                0
## 194  2    3                 0             0                0                0
## 195  0    2                 0             0                0                0
## 196  0    3                 0             0                0                0
## 197  0    2                 0             0                0                0
## 198  2    3                 0             0                0                0
## 199  2    3                 0             0                0                0
## 200  2    1                 0             0                0                0
## 201  1    2                 0             0                0                0
## 202  1    3                 0             0                0                0
## 203  0    3                 0             0                0                0
## 204  0    3                 1             0                0                0
## 205  3    3                 0             0                0                1
## 206  1    3                 0             0                0                0
## 207  1    3                 0             0                0                0
## 208  2    3                 0             0                0                0
## 209  3    3                 0             0                0                0
## 210  1    3                 0             0                0                0
## 211  1    3                 0             0                0                0
## 212  1    3                 0             0                0                0
## 213  0    3                 0             0                0                0
## 214  0    3                 0             0                0                0
## 215  1    2                 0             0                0                0
## 216  0    3                 0             0                0                0
## 217  1    3                 0             0                0                0
## 218  3    3                 0             0                0                0
## 219  1    3                 0             0                0                0
## 220  2    3                 0             0                0                0
## 221  3    3                 0             1                0                0
## 222  0    3                 0             0                0                1
## 223  1    2                 0             0                0                0
## 224  2    3                 1             0                0                0
## 225  1    3                 0             0                0                0
## 226  0    3                 0             0                0                0
## 227  1    3                 0             0                0                0
## 228  0    3                 0             0                0                0
## 229  0    3                 0             0                0                0
## 230  0    3                 0             0                0                0
## 231  0    2                 0             0                0                0
## 232  3    3                 0             0                0                0
## 233  1    3                 0             0                0                0
## 234  1    2                 0             0                0                0
## 235  3    2                 0             0                0                0
## 236  0    3                 0             0                0                0
## 237  2    3                 0             0                0                0
## 238  2    3                 0             0                0                0
## 239  3    2                 0             0                0                0
## 240  0    3                 0             0                0                0
## 241  1    3                 0             0                0                0
## 242  0    2                 1             0                0                0
## 243  2    1                 0             0                0                0
## 244  1    3                 0             0                0                0
## 245  1    1                 0             0                0                0
## 246  0    3                 0             0                0                0
## 247  2    3                 0             1                0                0
## 248  3    1                 0             0                0                0
## 249  1    3                 1             0                0                0
## 250  3    3                 0             0                0                0
## 251  3    3                 0             0                0                1
## 252  4    3                 0             0                0                0
## 253  3    2                 0             0                0                0
## 254  2    2                 0             0                0                0
## 255  0    2                 0             0                0                0
## 256  3    3                 0             0                0                0
## 257  2    3                 0             0                0                0
## 258  0    3                 0             0                0                0
## 259  0    2                 0             0                0                0
## 260  0    3                 0             0                0                0
## 261  2    3                 1             0                0                0
## 262  1    2                 0             0                0                0
## 263  2    3                 0             0                0                0
## 264  2    2                 0             0                0                0
## 265  1    2                 0             0                0                0
## 266  1    2                 0             0                0                0
## 267  0    2                 1             0                0                0
## 268  3    2                 0             0                0                0
## 269  2    2                 0             0                0                0
## 270  0    3                 0             0                0                0
## 271  0    3                 0             0                0                0
## 272  2    2                 0             0                0                0
## 273  0    2                 0             0                1                0
## 274  1    3                 0             0                0                0
## 275  1    2                 0             0                0                0
## 276  2    3                 0             0                0                0
## 277  1    3                 0             0                0                0
## 278  0    3                 0             0                0                0
## 279  2    2                 0             0                0                0
## 280  1    2                 0             0                0                0
## 281  0    1                 0             0                0                0
## 282  0    0                 0             0                0                0
## 283  1    1                 0             0                0                0
## 284  0    3                 0             0                0                0
## 285  1    3                 0             0                0                0
## 286  2    3                 0             0                0                0
## 287  2    2                 0             0                0                0
## 288  1    2                 0             0                0                0
## 289  1    3                 0             0                0                0
## 290  1    3                 0             0                0                0
## 291  1    3                 0             0                0                0
## 292  3    1                 0             0                0                1
## 293  2    1                 0             0                0                0
## 294  0    3                 0             0                0                0
## 295  0    1                 0             0                0                0
## 296  2    3                 0             0                0                0
## 297  0    2                 0             0                0                0
## 298  2    1                 0             0                0                0
## 299  0    3                 0             0                0                0
## 300  0    3                 0             0                0                0
## 301  2    3                 0             0                0                0
## 302  1    3                 0             0                0                0
## 303  1    2                 0             0                0                0
##     Out_flag_ca Out_flag_thal Out_caping_age Out_caping_cp Out_caping_trestbps
## 1             0             0             63             3                 145
## 2             0             0             37             2                 130
## 3             0             0             41             1                 130
## 4             0             0             56             1                 120
## 5             0             0             57             0                 120
## 6             0             0             57             0                 140
## 7             0             0             56             1                 140
## 8             0             0             44             1                 120
## 9             0             0             52             2                 152
## 10            0             0             57             2                 150
## 11            0             0             54             0                 140
## 12            0             0             48             2                 130
## 13            0             0             49             1                 130
## 14            0             0             64             3                 110
## 15            0             0             58             3                 150
## 16            0             0             50             2                 120
## 17            0             0             58             2                 120
## 18            0             0             66             3                 150
## 19            0             0             43             0                 150
## 20            0             0             69             3                 140
## 21            0             0             59             0                 135
## 22            0             0             44             2                 130
## 23            0             0             42             0                 140
## 24            0             0             61             2                 150
## 25            0             0             40             3                 140
## 26            0             0             71             1                 160
## 27            0             0             59             2                 150
## 28            0             0             51             2                 110
## 29            0             0             65             2                 140
## 30            0             0             53             2                 130
## 31            0             0             41             1                 105
## 32            0             0             65             0                 120
## 33            0             0             44             1                 130
## 34            0             0             54             2                 125
## 35            0             0             51             3                 125
## 36            0             0             46             2                 142
## 37            0             0             54             2                 135
## 38            0             0             54             2                 150
## 39            0             0             65             2                 155
## 40            0             0             65             2                 160
## 41            0             0             51             2                 140
## 42            0             0             48             1                 130
## 43            0             0             45             0                 104
## 44            0             0             53             0                 130
## 45            0             0             39             2                 140
## 46            0             0             52             1                 120
## 47            0             0             44             2                 140
## 48            0             0             47             2                 138
## 49            0             1             53             2                 128
## 50            0             0             53             0                 138
## 51            0             0             51             2                 130
## 52            0             0             66             0                 120
## 53            1             0             62             2                 130
## 54            0             0             44             2                 108
## 55            0             0             63             2                 135
## 56            0             0             52             1                 134
## 57            0             0             48             0                 122
## 58            0             0             45             0                 115
## 59            0             0             34             3                 118
## 60            0             0             57             0                 128
## 61            0             0             71             2                 110
## 62            0             0             54             1                 108
## 63            0             0             52             3                 118
## 64            0             0             41             1                 135
## 65            0             0             58             2                 140
## 66            0             0             35             0                 138
## 67            0             0             51             2                 100
## 68            0             0             45             1                 130
## 69            0             0             44             1                 120
## 70            0             0             62             0                 124
## 71            0             0             54             2                 120
## 72            0             0             51             2                  94
## 73            0             0             29             1                 130
## 74            0             0             51             0                 140
## 75            0             0             43             2                 122
## 76            0             0             55             1                 135
## 77            0             0             51             2                 125
## 78            0             0             59             1                 140
## 79            0             0             52             1                 128
## 80            0             0             58             2                 105
## 81            0             0             41             2                 112
## 82            0             0             45             1                 128
## 83            0             0             60             2                 102
## 84            0             0             52             3                 152
## 85            0             0             42             0                 102
## 86            0             0             67             2                 115
## 87            0             0             68             2                 118
## 88            0             0             46             1                 101
## 89            0             0             54             2                 110
## 90            0             0             58             0                 100
## 91            0             0             48             2                 124
## 92            0             0             57             0                 132
## 93            1             0             52             2                 138
## 94            0             0             54             1                 132
## 95            0             0             45             1                 112
## 96            0             0             53             0                 142
## 97            0             0             62             0                 140
## 98            1             0             52             0                 108
## 99            0             0             43             2                 130
## 100           1             0             53             2                 130
## 101           0             0             42             3                 148
## 102           0             0             59             3                 152
## 103           0             0             63             1                 140
## 104           0             0             42             2                 120
## 105           0             0             50             2                 129
## 106           0             0             68             2                 120
## 107           0             0             69             3                 160
## 108           0             0             45             0                 138
## 109           0             0             50             1                 120
## 110           0             0             50             0                 110
## 111           0             0             64             0                 152
## 112           0             0             57             2                 150
## 113           0             0             64             2                 140
## 114           0             0             43             0                 110
## 115           0             0             55             1                 130
## 116           0             0             37             2                 120
## 117           0             0             41             2                 130
## 118           0             0             56             3                 120
## 119           0             0             46             1                 105
## 120           0             0             46             0                 138
## 121           0             0             64             0                 130
## 122           0             0             59             0                 138
## 123           0             0             41             2                 112
## 124           0             0             54             2                 108
## 125           0             0             39             2                  94
## 126           0             0             34             1                 118
## 127           0             0             47             0                 112
## 128           0             0             67             2                 152
## 129           0             0             52             2                 136
## 130           0             0             74             1                 120
## 131           0             0             54             2                 160
## 132           0             0             49             1                 134
## 133           0             0             42             1                 120
## 134           0             0             41             1                 110
## 135           0             0             41             1                 126
## 136           0             0             49             0                 130
## 137           0             0             60             2                 120
## 138           0             0             62             1                 128
## 139           0             0             57             0                 110
## 140           0             0             64             0                 128
## 141           0             0             51             2                 120
## 142           0             0             43             0                 115
## 143           0             0             42             2                 120
## 144           0             0             67             0                 106
## 145           0             0             76             2                 140
## 146           0             0             70             1                 156
## 147           0             0             44             2                 118
## 148           0             0             60             3                 150
## 149           0             0             44             2                 120
## 150           0             0             42             2                 130
## 151           0             0             66             0                 160
## 152           0             0             71             0                 112
## 153           0             0             64             3                 170
## 154           0             0             66             2                 146
## 155           0             0             39             2                 138
## 156           0             0             58             0                 130
## 157           0             0             47             2                 130
## 158           0             0             35             1                 122
## 159           1             0             58             1                 125
## 160           0             0             56             1                 130
## 161           0             0             56             1                 120
## 162           0             0             55             1                 132
## 163           0             0             41             1                 120
## 164           1             0             38             2                 138
## 165           1             0             38             2                 138
## 166           1             0             67             0                 160
## 167           0             0             67             0                 120
## 168           0             0             62             0                 140
## 169           0             0             63             0                 130
## 170           0             0             53             0                 140
## 171           0             0             56             2                 130
## 172           0             0             48             1                 110
## 173           0             0             58             1                 120
## 174           0             0             58             2                 132
## 175           0             0             60             0                 130
## 176           0             0             40             0                 110
## 177           0             0             60             0                 117
## 178           0             0             64             2                 140
## 179           0             0             43             0                 120
## 180           0             0             57             0                 150
## 181           0             0             55             0                 132
## 182           1             0             65             0                 150
## 183           0             0             61             0                 130
## 184           0             0             58             2                 112
## 185           0             0             50             0                 150
## 186           0             0             44             0                 112
## 187           0             0             60             0                 130
## 188           0             0             54             0                 124
## 189           0             0             50             2                 140
## 190           0             0             41             0                 110
## 191           0             0             51             0                 130
## 192           1             0             58             0                 128
## 193           0             0             54             0                 120
## 194           0             0             60             0                 145
## 195           0             0             60             2                 140
## 196           0             0             59             0                 170
## 197           0             0             46             2                 150
## 198           0             0             67             0                 125
## 199           0             0             62             0                 120
## 200           0             0             65             0                 110
## 201           0             0             44             0                 110
## 202           0             0             60             0                 125
## 203           0             0             58             0                 150
## 204           0             0             68             2                 152
## 205           1             0             62             0                 160
## 206           0             0             52             0                 128
## 207           0             0             59             0                 110
## 208           0             0             60             0                 150
## 209           1             0             49             2                 120
## 210           0             0             59             0                 140
## 211           0             0             57             2                 128
## 212           0             0             61             0                 120
## 213           0             0             39             0                 118
## 214           0             0             61             0                 145
## 215           0             0             56             0                 125
## 216           0             0             43             0                 132
## 217           0             0             62             2                 130
## 218           1             0             63             0                 130
## 219           0             0             65             0                 135
## 220           0             0             48             0                 130
## 221           1             0             63             0                 150
## 222           0             0             55             0                 140
## 223           0             0             65             3                 138
## 224           0             0             56             0                 152
## 225           0             0             54             0                 110
## 226           0             0             70             0                 145
## 227           0             0             62             1                 120
## 228           0             0             35             0                 120
## 229           0             0             59             3                 170
## 230           0             0             64             2                 125
## 231           0             0             47             2                 108
## 232           1             0             57             0                 165
## 233           0             0             55             0                 160
## 234           0             0             64             0                 120
## 235           1             0             70             0                 130
## 236           0             0             51             0                 140
## 237           0             0             58             0                 125
## 238           0             0             60             0                 140
## 239           1             0             77             0                 125
## 240           0             0             35             0                 126
## 241           0             0             70             2                 160
## 242           0             0             59             0                 152
## 243           0             0             64             0                 145
## 244           0             0             57             0                 152
## 245           0             0             56             0                 132
## 246           0             0             48             0                 124
## 247           0             0             56             0                 134
## 248           1             0             66             1                 160
## 249           0             0             54             1                 152
## 250           1             0             69             2                 140
## 251           1             0             51             0                 140
## 252           1             0             43             0                 132
## 253           1             0             62             0                 138
## 254           0             0             67             0                 100
## 255           0             0             59             3                 160
## 256           1             0             45             0                 142
## 257           0             0             58             0                 128
## 258           0             0             50             0                 144
## 259           0             0             62             0                 150
## 260           0             0             38             3                 120
## 261           0             0             66             0                 152
## 262           0             0             52             0                 112
## 263           0             0             53             0                 123
## 264           0             0             63             0                 108
## 265           0             0             54             0                 110
## 266           0             0             66             0                 112
## 267           0             0             55             0                 152
## 268           1             0             49             2                 118
## 269           0             0             54             0                 122
## 270           0             0             56             0                 130
## 271           0             0             46             0                 120
## 272           0             0             61             3                 134
## 273           0             0             67             0                 120
## 274           0             0             58             0                 100
## 275           0             0             47             0                 110
## 276           0             0             52             0                 125
## 277           0             0             58             0                 146
## 278           0             0             57             1                 124
## 279           0             0             58             1                 136
## 280           0             0             61             0                 138
## 281           0             0             42             0                 136
## 282           0             1             52             0                 128
## 283           0             0             59             2                 126
## 284           0             0             40             0                 152
## 285           0             0             61             0                 140
## 286           0             0             46             0                 140
## 287           0             0             59             3                 134
## 288           0             0             57             1                 154
## 289           0             0             57             0                 110
## 290           0             0             55             0                 128
## 291           0             0             61             0                 148
## 292           1             0             58             0                 114
## 293           0             0             58             0                 170
## 294           0             0             67             2                 152
## 295           0             0             44             0                 120
## 296           0             0             63             0                 140
## 297           0             0             63             0                 124
## 298           0             0             59             0                 164
## 299           0             0             57             0                 140
## 300           0             0             45             3                 110
## 301           0             0             68             0                 144
## 302           0             0             57             0                 130
## 303           0             0             57             1                 130
##     Out_caping_chol Out_caping_thalach Out_caping_oldpeak Out_caping_ca
## 1             233.0                150                2.3             0
## 2             250.0                187                3.5             0
## 3             204.0                172                1.4             0
## 4             236.0                178                0.8             0
## 5             354.0                163                0.6             0
## 6             192.0                148                0.4             0
## 7             294.0                153                1.3             0
## 8             263.0                173                0.0             0
## 9             199.0                162                0.5             0
## 10            168.0                174                1.6             0
## 11            239.0                160                1.2             0
## 12            275.0                139                0.2             0
## 13            266.0                171                0.6             0
## 14            211.0                144                1.8             0
## 15            283.0                162                1.0             0
## 16            219.0                158                1.6             0
## 17            340.0                172                0.0             0
## 18            226.0                114                2.6             0
## 19            247.0                171                1.5             0
## 20            239.0                151                1.8             2
## 21            234.0                161                0.5             0
## 22            233.0                179                0.4             0
## 23            226.0                178                0.0             0
## 24            243.0                137                1.0             0
## 25            199.0                178                1.4             0
## 26            302.0                162                0.4             2
## 27            212.0                157                1.6             0
## 28            175.0                123                0.6             0
## 29            308.8                157                0.8             1
## 30            197.0                152                1.2             0
## 31            198.0                168                0.0             1
## 32            177.0                140                0.4             0
## 33            219.0                188                0.0             0
## 34            273.0                152                0.5             1
## 35            213.0                125                1.4             1
## 36            177.0                160                1.4             0
## 37            304.0                170                0.0             0
## 38            232.0                165                1.6             0
## 39            269.0                148                0.8             0
## 40            360.0                151                0.8             0
## 41            308.0                142                1.5             1
## 42            245.0                180                0.2             0
## 43            208.0                148                3.0             0
## 44            264.0                143                0.4             0
## 45            321.0                182                0.0             0
## 46            325.0                172                0.2             0
## 47            235.0                180                0.0             0
## 48            257.0                156                0.0             0
## 49            216.0                115                0.0             0
## 50            234.0                160                0.0             0
## 51            256.0                149                0.5             0
## 52            302.0                151                0.4             0
## 53            231.0                146                1.8             2
## 54            141.0                175                0.6             0
## 55            252.0                172                0.0             0
## 56            201.0                158                0.8             1
## 57            222.0                186                0.0             0
## 58            260.0                185                0.0             0
## 59            182.0                174                0.0             0
## 60            303.0                159                0.0             1
## 61            265.0                130                0.0             1
## 62            309.0                156                0.0             0
## 63            186.0                190                0.0             0
## 64            203.0                132                0.0             0
## 65            211.0                165                0.0             0
## 66            183.0                182                1.4             0
## 67            222.0                143                1.2             0
## 68            234.0                175                0.6             0
## 69            220.0                170                0.0             0
## 70            209.0                163                0.0             0
## 71            258.0                147                0.4             0
## 72            227.0                154                0.0             1
## 73            204.0                202                0.0             0
## 74            261.0                186                0.0             0
## 75            213.0                165                0.2             0
## 76            250.0                161                1.4             0
## 77            245.0                166                2.4             0
## 78            221.0                164                0.0             0
## 79            205.0                184                0.0             0
## 80            240.0                154                0.6             0
## 81            250.0                179                0.0             0
## 82            308.0                170                0.0             0
## 83            318.0                160                0.0             1
## 84            298.0                178                1.2             0
## 85            265.0                122                0.6             0
## 86            308.8                160                1.6             0
## 87            277.0                151                1.0             1
## 88            197.0                156                0.0             0
## 89            214.0                158                1.6             0
## 90            248.0                122                1.0             0
## 91            255.0                175                0.0             2
## 92            207.0                168                0.0             0
## 93            223.0                169                0.0             2
## 94            288.0                159                0.0             1
## 95            160.0                138                0.0             0
## 96            226.0                111                0.0             0
## 97            308.8                157                1.2             0
## 98            233.0                147                0.1             2
## 99            315.0                162                1.9             1
## 100           246.0                173                0.0             2
## 101           244.0                178                0.8             2
## 102           270.0                145                2.8             0
## 103           195.0                179                0.0             2
## 104           240.0                194                0.8             0
## 105           196.0                163                0.0             0
## 106           211.0                115                1.5             0
## 107           234.0                131                0.1             1
## 108           236.0                152                0.2             0
## 109           244.0                162                1.1             0
## 110           254.0                159                0.0             0
## 111           325.0                154                0.0             0
## 112           126.0                173                0.2             1
## 113           313.0                133                0.2             0
## 114           211.0                161                0.0             0
## 115           262.0                155                0.0             0
## 116           215.0                170                0.0             0
## 117           214.0                168                2.0             0
## 118           193.0                162                1.9             0
## 119           204.0                172                0.0             0
## 120           243.0                152                0.0             0
## 121           303.0                122                2.0             2
## 122           271.0                182                0.0             0
## 123           268.0                172                0.0             0
## 124           267.0                167                0.0             0
## 125           199.0                179                0.0             0
## 126           210.0                192                0.7             0
## 127           204.0                143                0.1             0
## 128           277.0                172                0.0             1
## 129           196.0                169                0.1             0
## 130           269.0                121                0.2             1
## 131           201.0                163                0.0             1
## 132           271.0                162                0.0             0
## 133           295.0                162                0.0             0
## 134           235.0                153                0.0             0
## 135           306.0                163                0.0             0
## 136           269.0                163                0.0             0
## 137           178.0                 96                0.0             0
## 138           208.0                140                0.0             0
## 139           201.0                126                1.5             0
## 140           263.0                105                0.2             1
## 141           295.0                157                0.6             0
## 142           303.0                181                1.2             0
## 143           209.0                173                0.0             0
## 144           223.0                142                0.3             2
## 145           197.0                116                1.1             0
## 146           245.0                143                0.0             0
## 147           242.0                149                0.3             1
## 148           240.0                171                0.9             0
## 149           226.0                169                0.0             0
## 150           180.0                150                0.0             0
## 151           228.0                138                2.3             0
## 152           149.0                125                1.6             0
## 153           227.0                155                0.6             0
## 154           278.0                152                0.0             1
## 155           220.0                152                0.0             0
## 156           197.0                131                0.6             0
## 157           253.0                179                0.0             0
## 158           192.0                174                0.0             0
## 159           220.0                144                0.4             2
## 160           221.0                163                0.0             0
## 161           240.0                169                0.0             0
## 162           342.0                166                1.2             0
## 163           157.0                182                0.0             0
## 164           175.0                173                0.0             2
## 165           175.0                173                0.0             2
## 166           286.0                108                1.5             2
## 167           229.0                129                2.6             2
## 168           268.0                160                3.6             2
## 169           254.0                147                1.4             1
## 170           203.0                155                3.1             0
## 171           256.0                142                0.6             1
## 172           229.0                168                1.0             0
## 173           284.0                160                1.8             0
## 174           224.0                173                3.2             2
## 175           206.0                132                2.4             2
## 176           167.0                114                2.0             0
## 177           230.0                160                1.4             2
## 178           335.0                158                0.0             0
## 179           177.0                120                2.5             0
## 180           276.0                112                0.6             1
## 181           353.0                132                1.2             1
## 182           225.0                114                1.0             2
## 183           330.0                169                0.0             0
## 184           230.0                165                2.5             1
## 185           243.0                128                2.6             0
## 186           290.0                153                0.0             1
## 187           253.0                144                1.4             1
## 188           266.0                109                2.2             1
## 189           233.0                163                0.6             1
## 190           172.0                158                0.0             0
## 191           305.0                142                1.2             0
## 192           216.0                131                2.2             2
## 193           188.0                113                1.4             1
## 194           282.0                142                2.8             2
## 195           185.0                155                3.0             0
## 196           326.0                140                3.4             0
## 197           231.0                147                3.6             0
## 198           254.0                163                0.2             2
## 199           267.0                 99                1.8             2
## 200           248.0                158                0.6             2
## 201           197.0                177                0.0             1
## 202           258.0                141                2.8             1
## 203           270.0                111                0.8             0
## 204           274.0                150                1.6             0
## 205           164.0                145                2.8             2
## 206           255.0                161                0.0             1
## 207           239.0                142                1.2             1
## 208           258.0                157                2.6             2
## 209           188.0                139                2.0             2
## 210           177.0                162                0.0             1
## 211           229.0                150                0.4             1
## 212           260.0                140                3.6             1
## 213           219.0                140                1.2             0
## 214           307.0                146                1.0             0
## 215           249.0                144                1.2             1
## 216           341.0                136                3.0             0
## 217           263.0                 97                1.2             1
## 218           330.0                132                1.8             2
## 219           254.0                127                2.8             1
## 220           256.0                150                0.0             2
## 221           308.8                154                4.0             2
## 222           217.0                111                2.8             0
## 223           282.0                174                1.4             1
## 224           288.0                133                4.0             2
## 225           239.0                126                2.8             1
## 226           174.0                125                2.6             0
## 227           281.0                103                1.4             1
## 228           198.0                130                1.6             0
## 229           288.0                159                0.2             0
## 230           309.0                131                1.8             0
## 231           243.0                152                0.0             0
## 232           289.0                124                1.0             2
## 233           289.0                145                0.8             1
## 234           246.0                 96                2.2             1
## 235           322.0                109                2.4             2
## 236           299.0                173                1.6             0
## 237           300.0                171                0.0             2
## 238           293.0                170                1.2             2
## 239           304.0                162                0.0             2
## 240           282.0                156                0.0             0
## 241           269.0                112                2.9             1
## 242           249.0                143                0.0             0
## 243           212.0                132                2.0             2
## 244           274.0                 88                1.2             1
## 245           184.0                105                2.1             1
## 246           274.0                166                0.5             0
## 247           308.8                150                1.9             2
## 248           246.0                120                0.0             2
## 249           283.0                195                0.0             1
## 250           254.0                146                2.0             2
## 251           298.0                122                2.8             2
## 252           247.0                143                0.1             2
## 253           294.0                106                1.9             2
## 254           299.0                125                0.9             2
## 255           273.0                125                0.0             0
## 256           309.0                147                0.0             2
## 257           259.0                130                3.0             2
## 258           200.0                126                0.9             0
## 259           244.0                154                1.4             0
## 260           231.0                182                3.8             0
## 261           228.0                165                1.0             2
## 262           230.0                160                0.0             1
## 263           282.0                 95                2.0             2
## 264           269.0                169                1.8             2
## 265           206.0                108                0.0             1
## 266           212.0                132                0.1             1
## 267           327.0                117                3.4             0
## 268           149.0                126                0.8             2
## 269           286.0                116                3.2             2
## 270           283.0                103                1.6             0
## 271           249.0                144                0.8             0
## 272           234.0                145                2.6             2
## 273           237.0                116                1.0             0
## 274           234.0                156                0.1             1
## 275           275.0                118                1.0             1
## 276           212.0                168                1.0             2
## 277           218.0                105                2.0             1
## 278           261.0                141                0.3             0
## 279           319.0                152                0.0             2
## 280           166.0                125                3.6             1
## 281           315.0                125                1.8             0
## 282           204.0                156                1.0             0
## 283           218.0                134                2.2             1
## 284           223.0                181                0.0             0
## 285           207.0                138                1.9             1
## 286           311.0                120                1.8             2
## 287           204.0                162                0.8             2
## 288           232.0                164                0.0             1
## 289           335.0                143                3.0             1
## 290           205.0                130                2.0             1
## 291           203.0                161                0.0             1
## 292           318.0                140                2.8             2
## 293           225.0                146                2.8             2
## 294           212.0                150                0.8             0
## 295           169.0                144                2.8             0
## 296           187.0                144                4.0             2
## 297           197.0                136                0.0             0
## 298           176.0                 90                1.0             2
## 299           241.0                123                0.2             0
## 300           264.0                132                1.2             0
## 301           193.0                141                3.4             2
## 302           131.0                115                1.2             1
## 303           236.0                174                0.0             1
##     Out_caping_thal
## 1                 1
## 2                 2
## 3                 2
## 4                 2
## 5                 2
## 6                 1
## 7                 2
## 8                 3
## 9                 3
## 10                2
## 11                2
## 12                2
## 13                2
## 14                2
## 15                2
## 16                2
## 17                2
## 18                2
## 19                2
## 20                2
## 21                3
## 22                2
## 23                2
## 24                2
## 25                3
## 26                2
## 27                2
## 28                2
## 29                2
## 30                2
## 31                2
## 32                3
## 33                2
## 34                2
## 35                2
## 36                2
## 37                2
## 38                3
## 39                2
## 40                2
## 41                2
## 42                2
## 43                2
## 44                2
## 45                2
## 46                2
## 47                2
## 48                2
## 49                2
## 50                2
## 51                2
## 52                2
## 53                3
## 54                2
## 55                2
## 56                2
## 57                2
## 58                2
## 59                2
## 60                2
## 61                2
## 62                3
## 63                1
## 64                1
## 65                2
## 66                2
## 67                2
## 68                2
## 69                2
## 70                2
## 71                3
## 72                3
## 73                2
## 74                2
## 75                2
## 76                2
## 77                2
## 78                2
## 79                2
## 80                3
## 81                2
## 82                2
## 83                2
## 84                3
## 85                2
## 86                3
## 87                3
## 88                3
## 89                2
## 90                2
## 91                2
## 92                3
## 93                2
## 94                2
## 95                2
## 96                3
## 97                2
## 98                3
## 99                2
## 100               2
## 101               2
## 102               3
## 103               2
## 104               3
## 105               2
## 106               2
## 107               2
## 108               2
## 109               2
## 110               2
## 111               2
## 112               3
## 113               3
## 114               3
## 115               2
## 116               2
## 117               2
## 118               3
## 119               2
## 120               2
## 121               2
## 122               2
## 123               2
## 124               2
## 125               2
## 126               2
## 127               2
## 128               2
## 129               2
## 130               2
## 131               2
## 132               2
## 133               2
## 134               2
## 135               2
## 136               2
## 137               2
## 138               2
## 139               1
## 140               3
## 141               2
## 142               2
## 143               2
## 144               2
## 145               2
## 146               2
## 147               2
## 148               2
## 149               2
## 150               2
## 151               1
## 152               2
## 153               3
## 154               2
## 155               2
## 156               2
## 157               2
## 158               2
## 159               3
## 160               3
## 161               2
## 162               2
## 163               2
## 164               2
## 165               2
## 166               2
## 167               3
## 168               2
## 169               3
## 170               3
## 171               1
## 172               3
## 173               2
## 174               3
## 175               3
## 176               3
## 177               3
## 178               2
## 179               3
## 180               1
## 181               3
## 182               3
## 183               2
## 184               3
## 185               3
## 186               2
## 187               3
## 188               3
## 189               3
## 190               3
## 191               3
## 192               3
## 193               3
## 194               3
## 195               2
## 196               3
## 197               2
## 198               3
## 199               3
## 200               1
## 201               2
## 202               3
## 203               3
## 204               3
## 205               3
## 206               3
## 207               3
## 208               3
## 209               3
## 210               3
## 211               3
## 212               3
## 213               3
## 214               3
## 215               2
## 216               3
## 217               3
## 218               3
## 219               3
## 220               3
## 221               3
## 222               3
## 223               2
## 224               3
## 225               3
## 226               3
## 227               3
## 228               3
## 229               3
## 230               3
## 231               2
## 232               3
## 233               3
## 234               2
## 235               2
## 236               3
## 237               3
## 238               3
## 239               2
## 240               3
## 241               3
## 242               2
## 243               1
## 244               3
## 245               1
## 246               3
## 247               3
## 248               1
## 249               3
## 250               3
## 251               3
## 252               3
## 253               2
## 254               2
## 255               2
## 256               3
## 257               3
## 258               3
## 259               2
## 260               3
## 261               3
## 262               2
## 263               3
## 264               2
## 265               2
## 266               2
## 267               2
## 268               2
## 269               2
## 270               3
## 271               3
## 272               2
## 273               2
## 274               3
## 275               2
## 276               3
## 277               3
## 278               3
## 279               2
## 280               2
## 281               1
## 282               2
## 283               1
## 284               3
## 285               3
## 286               3
## 287               2
## 288               2
## 289               3
## 290               3
## 291               3
## 292               1
## 293               1
## 294               3
## 295               1
## 296               3
## 297               2
## 298               1
## 299               3
## 300               3
## 301               3
## 302               3
## 303               2
## 
## $master_data
##     target_var cp Out_caping_thalach Out_caping_oldpeak Out_caping_ca oldpeak
## 1            1  3                150                2.3             0     2.3
## 2            1  2                187                3.5             0     3.5
## 3            1  1                172                1.4             0     1.4
## 4            1  1                178                0.8             0     0.8
## 5            1  0                163                0.6             0     0.6
## 6            1  0                148                0.4             0     0.4
## 7            1  1                153                1.3             0     1.3
## 8            1  1                173                0.0             0     0.0
## 9            1  2                162                0.5             0     0.5
## 10           1  2                174                1.6             0     1.6
## 11           1  0                160                1.2             0     1.2
## 12           1  2                139                0.2             0     0.2
## 13           1  1                171                0.6             0     0.6
## 14           1  3                144                1.8             0     1.8
## 15           1  3                162                1.0             0     1.0
## 16           1  2                158                1.6             0     1.6
## 17           1  2                172                0.0             0     0.0
## 18           1  3                114                2.6             0     2.6
## 19           1  0                171                1.5             0     1.5
## 20           1  3                151                1.8             2     1.8
## 21           1  0                161                0.5             0     0.5
## 22           1  2                179                0.4             0     0.4
## 23           1  0                178                0.0             0     0.0
## 24           1  2                137                1.0             0     1.0
## 25           1  3                178                1.4             0     1.4
## 26           1  1                162                0.4             2     0.4
## 27           1  2                157                1.6             0     1.6
## 28           1  2                123                0.6             0     0.6
## 29           1  2                157                0.8             1     0.8
## 30           1  2                152                1.2             0     1.2
## 31           1  1                168                0.0             1     0.0
## 32           1  0                140                0.4             0     0.4
## 33           1  1                188                0.0             0     0.0
## 34           1  2                152                0.5             1     0.5
## 35           1  3                125                1.4             1     1.4
## 36           1  2                160                1.4             0     1.4
## 37           1  2                170                0.0             0     0.0
## 38           1  2                165                1.6             0     1.6
## 39           1  2                148                0.8             0     0.8
## 40           1  2                151                0.8             0     0.8
## 41           1  2                142                1.5             1     1.5
## 42           1  1                180                0.2             0     0.2
## 43           1  0                148                3.0             0     3.0
## 44           1  0                143                0.4             0     0.4
## 45           1  2                182                0.0             0     0.0
## 46           1  1                172                0.2             0     0.2
## 47           1  2                180                0.0             0     0.0
## 48           1  2                156                0.0             0     0.0
## 49           1  2                115                0.0             0     0.0
## 50           1  0                160                0.0             0     0.0
## 51           1  2                149                0.5             0     0.5
## 52           1  0                151                0.4             0     0.4
## 53           1  2                146                1.8             2     1.8
## 54           1  2                175                0.6             0     0.6
## 55           1  2                172                0.0             0     0.0
## 56           1  1                158                0.8             1     0.8
## 57           1  0                186                0.0             0     0.0
## 58           1  0                185                0.0             0     0.0
## 59           1  3                174                0.0             0     0.0
## 60           1  0                159                0.0             1     0.0
## 61           1  2                130                0.0             1     0.0
## 62           1  1                156                0.0             0     0.0
## 63           1  3                190                0.0             0     0.0
## 64           1  1                132                0.0             0     0.0
## 65           1  2                165                0.0             0     0.0
## 66           1  0                182                1.4             0     1.4
## 67           1  2                143                1.2             0     1.2
## 68           1  1                175                0.6             0     0.6
## 69           1  1                170                0.0             0     0.0
## 70           1  0                163                0.0             0     0.0
## 71           1  2                147                0.4             0     0.4
## 72           1  2                154                0.0             1     0.0
## 73           1  1                202                0.0             0     0.0
## 74           1  0                186                0.0             0     0.0
## 75           1  2                165                0.2             0     0.2
## 76           1  1                161                1.4             0     1.4
## 77           1  2                166                2.4             0     2.4
## 78           1  1                164                0.0             0     0.0
## 79           1  1                184                0.0             0     0.0
## 80           1  2                154                0.6             0     0.6
## 81           1  2                179                0.0             0     0.0
## 82           1  1                170                0.0             0     0.0
## 83           1  2                160                0.0             1     0.0
## 84           1  3                178                1.2             0     1.2
## 85           1  0                122                0.6             0     0.6
## 86           1  2                160                1.6             0     1.6
## 87           1  2                151                1.0             1     1.0
## 88           1  1                156                0.0             0     0.0
## 89           1  2                158                1.6             0     1.6
## 90           1  0                122                1.0             0     1.0
## 91           1  2                175                0.0             2     0.0
## 92           1  0                168                0.0             0     0.0
## 93           1  2                169                0.0             2     0.0
## 94           1  1                159                0.0             1     0.0
## 95           1  1                138                0.0             0     0.0
## 96           1  0                111                0.0             0     0.0
## 97           1  0                157                1.2             0     1.2
## 98           1  0                147                0.1             2     0.1
## 99           1  2                162                1.9             1     1.9
## 100          1  2                173                0.0             2     0.0
## 101          1  3                178                0.8             2     0.8
## 102          1  3                145                2.8             0     4.2
## 103          1  1                179                0.0             2     0.0
## 104          1  2                194                0.8             0     0.8
## 105          1  2                163                0.0             0     0.0
## 106          1  2                115                1.5             0     1.5
## 107          1  3                131                0.1             1     0.1
## 108          1  0                152                0.2             0     0.2
## 109          1  1                162                1.1             0     1.1
## 110          1  0                159                0.0             0     0.0
## 111          1  0                154                0.0             0     0.0
## 112          1  2                173                0.2             1     0.2
## 113          1  2                133                0.2             0     0.2
## 114          1  0                161                0.0             0     0.0
## 115          1  1                155                0.0             0     0.0
## 116          1  2                170                0.0             0     0.0
## 117          1  2                168                2.0             0     2.0
## 118          1  3                162                1.9             0     1.9
## 119          1  1                172                0.0             0     0.0
## 120          1  0                152                0.0             0     0.0
## 121          1  0                122                2.0             2     2.0
## 122          1  0                182                0.0             0     0.0
## 123          1  2                172                0.0             0     0.0
## 124          1  2                167                0.0             0     0.0
## 125          1  2                179                0.0             0     0.0
## 126          1  1                192                0.7             0     0.7
## 127          1  0                143                0.1             0     0.1
## 128          1  2                172                0.0             1     0.0
## 129          1  2                169                0.1             0     0.1
## 130          1  1                121                0.2             1     0.2
## 131          1  2                163                0.0             1     0.0
## 132          1  1                162                0.0             0     0.0
## 133          1  1                162                0.0             0     0.0
## 134          1  1                153                0.0             0     0.0
## 135          1  1                163                0.0             0     0.0
## 136          1  0                163                0.0             0     0.0
## 137          1  2                 96                0.0             0     0.0
## 138          1  1                140                0.0             0     0.0
## 139          1  0                126                1.5             0     1.5
## 140          1  0                105                0.2             1     0.2
## 141          1  2                157                0.6             0     0.6
## 142          1  0                181                1.2             0     1.2
## 143          1  2                173                0.0             0     0.0
## 144          1  0                142                0.3             2     0.3
## 145          1  2                116                1.1             0     1.1
## 146          1  1                143                0.0             0     0.0
## 147          1  2                149                0.3             1     0.3
## 148          1  3                171                0.9             0     0.9
## 149          1  2                169                0.0             0     0.0
## 150          1  2                150                0.0             0     0.0
## 151          1  0                138                2.3             0     2.3
## 152          1  0                125                1.6             0     1.6
## 153          1  3                155                0.6             0     0.6
## 154          1  2                152                0.0             1     0.0
## 155          1  2                152                0.0             0     0.0
## 156          1  0                131                0.6             0     0.6
## 157          1  2                179                0.0             0     0.0
## 158          1  1                174                0.0             0     0.0
## 159          1  1                144                0.4             2     0.4
## 160          1  1                163                0.0             0     0.0
## 161          1  1                169                0.0             0     0.0
## 162          1  1                166                1.2             0     1.2
## 163          1  1                182                0.0             0     0.0
## 164          1  2                173                0.0             2     0.0
## 165          1  2                173                0.0             2     0.0
## 166          0  0                108                1.5             2     1.5
## 167          0  0                129                2.6             2     2.6
## 168          0  0                160                3.6             2     3.6
## 169          0  0                147                1.4             1     1.4
## 170          0  0                155                3.1             0     3.1
## 171          0  2                142                0.6             1     0.6
## 172          0  1                168                1.0             0     1.0
## 173          0  1                160                1.8             0     1.8
## 174          0  2                173                3.2             2     3.2
## 175          0  0                132                2.4             2     2.4
## 176          0  0                114                2.0             0     2.0
## 177          0  0                160                1.4             2     1.4
## 178          0  2                158                0.0             0     0.0
## 179          0  0                120                2.5             0     2.5
## 180          0  0                112                0.6             1     0.6
## 181          0  0                132                1.2             1     1.2
## 182          0  0                114                1.0             2     1.0
## 183          0  0                169                0.0             0     0.0
## 184          0  2                165                2.5             1     2.5
## 185          0  0                128                2.6             0     2.6
## 186          0  0                153                0.0             1     0.0
## 187          0  0                144                1.4             1     1.4
## 188          0  0                109                2.2             1     2.2
## 189          0  2                163                0.6             1     0.6
## 190          0  0                158                0.0             0     0.0
## 191          0  0                142                1.2             0     1.2
## 192          0  0                131                2.2             2     2.2
## 193          0  0                113                1.4             1     1.4
## 194          0  0                142                2.8             2     2.8
## 195          0  2                155                3.0             0     3.0
## 196          0  0                140                3.4             0     3.4
## 197          0  2                147                3.6             0     3.6
## 198          0  0                163                0.2             2     0.2
## 199          0  0                 99                1.8             2     1.8
## 200          0  0                158                0.6             2     0.6
## 201          0  0                177                0.0             1     0.0
## 202          0  0                141                2.8             1     2.8
## 203          0  0                111                0.8             0     0.8
## 204          0  2                150                1.6             0     1.6
## 205          0  0                145                2.8             2     6.2
## 206          0  0                161                0.0             1     0.0
## 207          0  0                142                1.2             1     1.2
## 208          0  0                157                2.6             2     2.6
## 209          0  2                139                2.0             2     2.0
## 210          0  0                162                0.0             1     0.0
## 211          0  2                150                0.4             1     0.4
## 212          0  0                140                3.6             1     3.6
## 213          0  0                140                1.2             0     1.2
## 214          0  0                146                1.0             0     1.0
## 215          0  0                144                1.2             1     1.2
## 216          0  0                136                3.0             0     3.0
## 217          0  2                 97                1.2             1     1.2
## 218          0  0                132                1.8             2     1.8
## 219          0  0                127                2.8             1     2.8
## 220          0  0                150                0.0             2     0.0
## 221          0  0                154                4.0             2     4.0
## 222          0  0                111                2.8             0     5.6
## 223          0  3                174                1.4             1     1.4
## 224          0  0                133                4.0             2     4.0
## 225          0  0                126                2.8             1     2.8
## 226          0  0                125                2.6             0     2.6
## 227          0  1                103                1.4             1     1.4
## 228          0  0                130                1.6             0     1.6
## 229          0  3                159                0.2             0     0.2
## 230          0  2                131                1.8             0     1.8
## 231          0  2                152                0.0             0     0.0
## 232          0  0                124                1.0             2     1.0
## 233          0  0                145                0.8             1     0.8
## 234          0  0                 96                2.2             1     2.2
## 235          0  0                109                2.4             2     2.4
## 236          0  0                173                1.6             0     1.6
## 237          0  0                171                0.0             2     0.0
## 238          0  0                170                1.2             2     1.2
## 239          0  0                162                0.0             2     0.0
## 240          0  0                156                0.0             0     0.0
## 241          0  2                112                2.9             1     2.9
## 242          0  0                143                0.0             0     0.0
## 243          0  0                132                2.0             2     2.0
## 244          0  0                 88                1.2             1     1.2
## 245          0  0                105                2.1             1     2.1
## 246          0  0                166                0.5             0     0.5
## 247          0  0                150                1.9             2     1.9
## 248          0  1                120                0.0             2     0.0
## 249          0  1                195                0.0             1     0.0
## 250          0  2                146                2.0             2     2.0
## 251          0  0                122                2.8             2     4.2
## 252          0  0                143                0.1             2     0.1
## 253          0  0                106                1.9             2     1.9
## 254          0  0                125                0.9             2     0.9
## 255          0  3                125                0.0             0     0.0
## 256          0  0                147                0.0             2     0.0
## 257          0  0                130                3.0             2     3.0
## 258          0  0                126                0.9             0     0.9
## 259          0  0                154                1.4             0     1.4
## 260          0  3                182                3.8             0     3.8
## 261          0  0                165                1.0             2     1.0
## 262          0  0                160                0.0             1     0.0
## 263          0  0                 95                2.0             2     2.0
## 264          0  0                169                1.8             2     1.8
## 265          0  0                108                0.0             1     0.0
## 266          0  0                132                0.1             1     0.1
## 267          0  0                117                3.4             0     3.4
## 268          0  2                126                0.8             2     0.8
## 269          0  0                116                3.2             2     3.2
## 270          0  0                103                1.6             0     1.6
## 271          0  0                144                0.8             0     0.8
## 272          0  3                145                2.6             2     2.6
## 273          0  0                116                1.0             0     1.0
## 274          0  0                156                0.1             1     0.1
## 275          0  0                118                1.0             1     1.0
## 276          0  0                168                1.0             2     1.0
## 277          0  0                105                2.0             1     2.0
## 278          0  1                141                0.3             0     0.3
## 279          0  1                152                0.0             2     0.0
## 280          0  0                125                3.6             1     3.6
## 281          0  0                125                1.8             0     1.8
## 282          0  0                156                1.0             0     1.0
## 283          0  2                134                2.2             1     2.2
## 284          0  0                181                0.0             0     0.0
## 285          0  0                138                1.9             1     1.9
## 286          0  0                120                1.8             2     1.8
## 287          0  3                162                0.8             2     0.8
## 288          0  1                164                0.0             1     0.0
## 289          0  0                143                3.0             1     3.0
## 290          0  0                130                2.0             1     2.0
## 291          0  0                161                0.0             1     0.0
## 292          0  0                140                2.8             2     4.4
## 293          0  0                146                2.8             2     2.8
## 294          0  2                150                0.8             0     0.8
## 295          0  0                144                2.8             0     2.8
## 296          0  0                144                4.0             2     4.0
## 297          0  0                136                0.0             0     0.0
## 298          0  0                 90                1.0             2     1.0
## 299          0  0                123                0.2             0     0.2
## 300          0  3                132                1.2             0     1.2
## 301          0  0                141                3.4             2     3.4
## 302          0  0                115                1.2             1     1.2
## 303          0  1                174                0.0             1     0.0
##     ca Out_caping_thal thal age Out_caping_chol trestbps chol
## 1    0               1    1  63           233.0      145  233
## 2    0               2    2  37           250.0      130  250
## 3    0               2    2  41           204.0      130  204
## 4    0               2    2  56           236.0      120  236
## 5    0               2    2  57           354.0      120  354
## 6    0               1    1  57           192.0      140  192
## 7    0               2    2  56           294.0      140  294
## 8    0               3    3  44           263.0      120  263
## 9    0               3    3  52           199.0      172  199
## 10   0               2    2  57           168.0      150  168
## 11   0               2    2  54           239.0      140  239
## 12   0               2    2  48           275.0      130  275
## 13   0               2    2  49           266.0      130  266
## 14   0               2    2  64           211.0      110  211
## 15   0               2    2  58           283.0      150  283
## 16   0               2    2  50           219.0      120  219
## 17   0               2    2  58           340.0      120  340
## 18   0               2    2  66           226.0      150  226
## 19   0               2    2  43           247.0      150  247
## 20   2               2    2  69           239.0      140  239
## 21   0               3    3  59           234.0      135  234
## 22   0               2    2  44           233.0      130  233
## 23   0               2    2  42           226.0      140  226
## 24   0               2    2  61           243.0      150  243
## 25   0               3    3  40           199.0      140  199
## 26   2               2    2  71           302.0      160  302
## 27   0               2    2  59           212.0      150  212
## 28   0               2    2  51           175.0      110  175
## 29   1               2    2  65           308.8      140  417
## 30   0               2    2  53           197.0      130  197
## 31   1               2    2  41           198.0      105  198
## 32   0               3    3  65           177.0      120  177
## 33   0               2    2  44           219.0      130  219
## 34   1               2    2  54           273.0      125  273
## 35   1               2    2  51           213.0      125  213
## 36   0               2    2  46           177.0      142  177
## 37   0               2    2  54           304.0      135  304
## 38   0               3    3  54           232.0      150  232
## 39   0               2    2  65           269.0      155  269
## 40   0               2    2  65           360.0      160  360
## 41   1               2    2  51           308.0      140  308
## 42   0               2    2  48           245.0      130  245
## 43   0               2    2  45           208.0      104  208
## 44   0               2    2  53           264.0      130  264
## 45   0               2    2  39           321.0      140  321
## 46   0               2    2  52           325.0      120  325
## 47   0               2    2  44           235.0      140  235
## 48   0               2    2  47           257.0      138  257
## 49   0               2    0  53           216.0      128  216
## 50   0               2    2  53           234.0      138  234
## 51   0               2    2  51           256.0      130  256
## 52   0               2    2  66           302.0      120  302
## 53   3               3    3  62           231.0      130  231
## 54   0               2    2  44           141.0      108  141
## 55   0               2    2  63           252.0      135  252
## 56   1               2    2  52           201.0      134  201
## 57   0               2    2  48           222.0      122  222
## 58   0               2    2  45           260.0      115  260
## 59   0               2    2  34           182.0      118  182
## 60   1               2    2  57           303.0      128  303
## 61   1               2    2  71           265.0      110  265
## 62   0               3    3  54           309.0      108  309
## 63   0               1    1  52           186.0      118  186
## 64   0               1    1  41           203.0      135  203
## 65   0               2    2  58           211.0      140  211
## 66   0               2    2  35           183.0      138  183
## 67   0               2    2  51           222.0      100  222
## 68   0               2    2  45           234.0      130  234
## 69   0               2    2  44           220.0      120  220
## 70   0               2    2  62           209.0      124  209
## 71   0               3    3  54           258.0      120  258
## 72   1               3    3  51           227.0       94  227
## 73   0               2    2  29           204.0      130  204
## 74   0               2    2  51           261.0      140  261
## 75   0               2    2  43           213.0      122  213
## 76   0               2    2  55           250.0      135  250
## 77   0               2    2  51           245.0      125  245
## 78   0               2    2  59           221.0      140  221
## 79   0               2    2  52           205.0      128  205
## 80   0               3    3  58           240.0      105  240
## 81   0               2    2  41           250.0      112  250
## 82   0               2    2  45           308.0      128  308
## 83   1               2    2  60           318.0      102  318
## 84   0               3    3  52           298.0      152  298
## 85   0               2    2  42           265.0      102  265
## 86   0               3    3  67           308.8      115  564
## 87   1               3    3  68           277.0      118  277
## 88   0               3    3  46           197.0      101  197
## 89   0               2    2  54           214.0      110  214
## 90   0               2    2  58           248.0      100  248
## 91   2               2    2  48           255.0      124  255
## 92   0               3    3  57           207.0      132  207
## 93   4               2    2  52           223.0      138  223
## 94   1               2    2  54           288.0      132  288
## 95   0               2    2  45           160.0      112  160
## 96   0               3    3  53           226.0      142  226
## 97   0               2    2  62           308.8      140  394
## 98   3               3    3  52           233.0      108  233
## 99   1               2    2  43           315.0      130  315
## 100  3               2    2  53           246.0      130  246
## 101  2               2    2  42           244.0      148  244
## 102  0               3    3  59           270.0      178  270
## 103  2               2    2  63           195.0      140  195
## 104  0               3    3  42           240.0      120  240
## 105  0               2    2  50           196.0      129  196
## 106  0               2    2  68           211.0      120  211
## 107  1               2    2  69           234.0      160  234
## 108  0               2    2  45           236.0      138  236
## 109  0               2    2  50           244.0      120  244
## 110  0               2    2  50           254.0      110  254
## 111  0               2    2  64           325.0      180  325
## 112  1               3    3  57           126.0      150  126
## 113  0               3    3  64           313.0      140  313
## 114  0               3    3  43           211.0      110  211
## 115  0               2    2  55           262.0      130  262
## 116  0               2    2  37           215.0      120  215
## 117  0               2    2  41           214.0      130  214
## 118  0               3    3  56           193.0      120  193
## 119  0               2    2  46           204.0      105  204
## 120  0               2    2  46           243.0      138  243
## 121  2               2    2  64           303.0      130  303
## 122  0               2    2  59           271.0      138  271
## 123  0               2    2  41           268.0      112  268
## 124  0               2    2  54           267.0      108  267
## 125  0               2    2  39           199.0       94  199
## 126  0               2    2  34           210.0      118  210
## 127  0               2    2  47           204.0      112  204
## 128  1               2    2  67           277.0      152  277
## 129  0               2    2  52           196.0      136  196
## 130  1               2    2  74           269.0      120  269
## 131  1               2    2  54           201.0      160  201
## 132  0               2    2  49           271.0      134  271
## 133  0               2    2  42           295.0      120  295
## 134  0               2    2  41           235.0      110  235
## 135  0               2    2  41           306.0      126  306
## 136  0               2    2  49           269.0      130  269
## 137  0               2    2  60           178.0      120  178
## 138  0               2    2  62           208.0      128  208
## 139  0               1    1  57           201.0      110  201
## 140  1               3    3  64           263.0      128  263
## 141  0               2    2  51           295.0      120  295
## 142  0               2    2  43           303.0      115  303
## 143  0               2    2  42           209.0      120  209
## 144  2               2    2  67           223.0      106  223
## 145  0               2    2  76           197.0      140  197
## 146  0               2    2  70           245.0      156  245
## 147  1               2    2  44           242.0      118  242
## 148  0               2    2  60           240.0      150  240
## 149  0               2    2  44           226.0      120  226
## 150  0               2    2  42           180.0      130  180
## 151  0               1    1  66           228.0      160  228
## 152  0               2    2  71           149.0      112  149
## 153  0               3    3  64           227.0      170  227
## 154  1               2    2  66           278.0      146  278
## 155  0               2    2  39           220.0      138  220
## 156  0               2    2  58           197.0      130  197
## 157  0               2    2  47           253.0      130  253
## 158  0               2    2  35           192.0      122  192
## 159  4               3    3  58           220.0      125  220
## 160  0               3    3  56           221.0      130  221
## 161  0               2    2  56           240.0      120  240
## 162  0               2    2  55           342.0      132  342
## 163  0               2    2  41           157.0      120  157
## 164  4               2    2  38           175.0      138  175
## 165  4               2    2  38           175.0      138  175
## 166  3               2    2  67           286.0      160  286
## 167  2               3    3  67           229.0      120  229
## 168  2               2    2  62           268.0      140  268
## 169  1               3    3  63           254.0      130  254
## 170  0               3    3  53           203.0      140  203
## 171  1               1    1  56           256.0      130  256
## 172  0               3    3  48           229.0      110  229
## 173  0               2    2  58           284.0      120  284
## 174  2               3    3  58           224.0      132  224
## 175  2               3    3  60           206.0      130  206
## 176  0               3    3  40           167.0      110  167
## 177  2               3    3  60           230.0      117  230
## 178  0               2    2  64           335.0      140  335
## 179  0               3    3  43           177.0      120  177
## 180  1               1    1  57           276.0      150  276
## 181  1               3    3  55           353.0      132  353
## 182  3               3    3  65           225.0      150  225
## 183  0               2    2  61           330.0      130  330
## 184  1               3    3  58           230.0      112  230
## 185  0               3    3  50           243.0      150  243
## 186  1               2    2  44           290.0      112  290
## 187  1               3    3  60           253.0      130  253
## 188  1               3    3  54           266.0      124  266
## 189  1               3    3  50           233.0      140  233
## 190  0               3    3  41           172.0      110  172
## 191  0               3    3  51           305.0      130  305
## 192  3               3    3  58           216.0      128  216
## 193  1               3    3  54           188.0      120  188
## 194  2               3    3  60           282.0      145  282
## 195  0               2    2  60           185.0      140  185
## 196  0               3    3  59           326.0      170  326
## 197  0               2    2  46           231.0      150  231
## 198  2               3    3  67           254.0      125  254
## 199  2               3    3  62           267.0      120  267
## 200  2               1    1  65           248.0      110  248
## 201  1               2    2  44           197.0      110  197
## 202  1               3    3  60           258.0      125  258
## 203  0               3    3  58           270.0      150  270
## 204  0               3    3  68           274.0      180  274
## 205  3               3    3  62           164.0      160  164
## 206  1               3    3  52           255.0      128  255
## 207  1               3    3  59           239.0      110  239
## 208  2               3    3  60           258.0      150  258
## 209  3               3    3  49           188.0      120  188
## 210  1               3    3  59           177.0      140  177
## 211  1               3    3  57           229.0      128  229
## 212  1               3    3  61           260.0      120  260
## 213  0               3    3  39           219.0      118  219
## 214  0               3    3  61           307.0      145  307
## 215  1               2    2  56           249.0      125  249
## 216  0               3    3  43           341.0      132  341
## 217  1               3    3  62           263.0      130  263
## 218  3               3    3  63           330.0      130  330
## 219  1               3    3  65           254.0      135  254
## 220  2               3    3  48           256.0      130  256
## 221  3               3    3  63           308.8      150  407
## 222  0               3    3  55           217.0      140  217
## 223  1               2    2  65           282.0      138  282
## 224  2               3    3  56           288.0      200  288
## 225  1               3    3  54           239.0      110  239
## 226  0               3    3  70           174.0      145  174
## 227  1               3    3  62           281.0      120  281
## 228  0               3    3  35           198.0      120  198
## 229  0               3    3  59           288.0      170  288
## 230  0               3    3  64           309.0      125  309
## 231  0               2    2  47           243.0      108  243
## 232  3               3    3  57           289.0      165  289
## 233  1               3    3  55           289.0      160  289
## 234  1               2    2  64           246.0      120  246
## 235  3               2    2  70           322.0      130  322
## 236  0               3    3  51           299.0      140  299
## 237  2               3    3  58           300.0      125  300
## 238  2               3    3  60           293.0      140  293
## 239  3               2    2  77           304.0      125  304
## 240  0               3    3  35           282.0      126  282
## 241  1               3    3  70           269.0      160  269
## 242  0               2    2  59           249.0      174  249
## 243  2               1    1  64           212.0      145  212
## 244  1               3    3  57           274.0      152  274
## 245  1               1    1  56           184.0      132  184
## 246  0               3    3  48           274.0      124  274
## 247  2               3    3  56           308.8      134  409
## 248  3               1    1  66           246.0      160  246
## 249  1               3    3  54           283.0      192  283
## 250  3               3    3  69           254.0      140  254
## 251  3               3    3  51           298.0      140  298
## 252  4               3    3  43           247.0      132  247
## 253  3               2    2  62           294.0      138  294
## 254  2               2    2  67           299.0      100  299
## 255  0               2    2  59           273.0      160  273
## 256  3               3    3  45           309.0      142  309
## 257  2               3    3  58           259.0      128  259
## 258  0               3    3  50           200.0      144  200
## 259  0               2    2  62           244.0      150  244
## 260  0               3    3  38           231.0      120  231
## 261  2               3    3  66           228.0      178  228
## 262  1               2    2  52           230.0      112  230
## 263  2               3    3  53           282.0      123  282
## 264  2               2    2  63           269.0      108  269
## 265  1               2    2  54           206.0      110  206
## 266  1               2    2  66           212.0      112  212
## 267  0               2    2  55           327.0      180  327
## 268  3               2    2  49           149.0      118  149
## 269  2               2    2  54           286.0      122  286
## 270  0               3    3  56           283.0      130  283
## 271  0               3    3  46           249.0      120  249
## 272  2               2    2  61           234.0      134  234
## 273  0               2    2  67           237.0      120  237
## 274  1               3    3  58           234.0      100  234
## 275  1               2    2  47           275.0      110  275
## 276  2               3    3  52           212.0      125  212
## 277  1               3    3  58           218.0      146  218
## 278  0               3    3  57           261.0      124  261
## 279  2               2    2  58           319.0      136  319
## 280  1               2    2  61           166.0      138  166
## 281  0               1    1  42           315.0      136  315
## 282  0               2    0  52           204.0      128  204
## 283  1               1    1  59           218.0      126  218
## 284  0               3    3  40           223.0      152  223
## 285  1               3    3  61           207.0      140  207
## 286  2               3    3  46           311.0      140  311
## 287  2               2    2  59           204.0      134  204
## 288  1               2    2  57           232.0      154  232
## 289  1               3    3  57           335.0      110  335
## 290  1               3    3  55           205.0      128  205
## 291  1               3    3  61           203.0      148  203
## 292  3               1    1  58           318.0      114  318
## 293  2               1    1  58           225.0      170  225
## 294  0               3    3  67           212.0      152  212
## 295  0               1    1  44           169.0      120  169
## 296  2               3    3  63           187.0      140  187
## 297  0               2    2  63           197.0      124  197
## 298  2               1    1  59           176.0      164  176
## 299  0               3    3  57           241.0      140  241
## 300  0               3    3  45           264.0      110  264
## 301  2               3    3  68           193.0      144  193
## 302  1               3    3  57           131.0      130  131
## 303  1               2    2  57           236.0      130  236
##     Out_caping_trestbps Out_flag_ca Out_flag_trestbps Out_flag_oldpeak
## 1                   145           0                 0                0
## 2                   130           0                 0                0
## 3                   130           0                 0                0
## 4                   120           0                 0                0
## 5                   120           0                 0                0
## 6                   140           0                 0                0
## 7                   140           0                 0                0
## 8                   120           0                 0                0
## 9                   152           0                 1                0
## 10                  150           0                 0                0
## 11                  140           0                 0                0
## 12                  130           0                 0                0
## 13                  130           0                 0                0
## 14                  110           0                 0                0
## 15                  150           0                 0                0
## 16                  120           0                 0                0
## 17                  120           0                 0                0
## 18                  150           0                 0                0
## 19                  150           0                 0                0
## 20                  140           0                 0                0
## 21                  135           0                 0                0
## 22                  130           0                 0                0
## 23                  140           0                 0                0
## 24                  150           0                 0                0
## 25                  140           0                 0                0
## 26                  160           0                 0                0
## 27                  150           0                 0                0
## 28                  110           0                 0                0
## 29                  140           0                 0                0
## 30                  130           0                 0                0
## 31                  105           0                 0                0
## 32                  120           0                 0                0
## 33                  130           0                 0                0
## 34                  125           0                 0                0
## 35                  125           0                 0                0
## 36                  142           0                 0                0
## 37                  135           0                 0                0
## 38                  150           0                 0                0
## 39                  155           0                 0                0
## 40                  160           0                 0                0
## 41                  140           0                 0                0
## 42                  130           0                 0                0
## 43                  104           0                 0                0
## 44                  130           0                 0                0
## 45                  140           0                 0                0
## 46                  120           0                 0                0
## 47                  140           0                 0                0
## 48                  138           0                 0                0
## 49                  128           0                 0                0
## 50                  138           0                 0                0
## 51                  130           0                 0                0
## 52                  120           0                 0                0
## 53                  130           1                 0                0
## 54                  108           0                 0                0
## 55                  135           0                 0                0
## 56                  134           0                 0                0
## 57                  122           0                 0                0
## 58                  115           0                 0                0
## 59                  118           0                 0                0
## 60                  128           0                 0                0
## 61                  110           0                 0                0
## 62                  108           0                 0                0
## 63                  118           0                 0                0
## 64                  135           0                 0                0
## 65                  140           0                 0                0
## 66                  138           0                 0                0
## 67                  100           0                 0                0
## 68                  130           0                 0                0
## 69                  120           0                 0                0
## 70                  124           0                 0                0
## 71                  120           0                 0                0
## 72                   94           0                 0                0
## 73                  130           0                 0                0
## 74                  140           0                 0                0
## 75                  122           0                 0                0
## 76                  135           0                 0                0
## 77                  125           0                 0                0
## 78                  140           0                 0                0
## 79                  128           0                 0                0
## 80                  105           0                 0                0
## 81                  112           0                 0                0
## 82                  128           0                 0                0
## 83                  102           0                 0                0
## 84                  152           0                 0                0
## 85                  102           0                 0                0
## 86                  115           0                 0                0
## 87                  118           0                 0                0
## 88                  101           0                 0                0
## 89                  110           0                 0                0
## 90                  100           0                 0                0
## 91                  124           0                 0                0
## 92                  132           0                 0                0
## 93                  138           1                 0                0
## 94                  132           0                 0                0
## 95                  112           0                 0                0
## 96                  142           0                 0                0
## 97                  140           0                 0                0
## 98                  108           1                 0                0
## 99                  130           0                 0                0
## 100                 130           1                 0                0
## 101                 148           0                 0                0
## 102                 152           0                 1                1
## 103                 140           0                 0                0
## 104                 120           0                 0                0
## 105                 129           0                 0                0
## 106                 120           0                 0                0
## 107                 160           0                 0                0
## 108                 138           0                 0                0
## 109                 120           0                 0                0
## 110                 110           0                 0                0
## 111                 152           0                 1                0
## 112                 150           0                 0                0
## 113                 140           0                 0                0
## 114                 110           0                 0                0
## 115                 130           0                 0                0
## 116                 120           0                 0                0
## 117                 130           0                 0                0
## 118                 120           0                 0                0
## 119                 105           0                 0                0
## 120                 138           0                 0                0
## 121                 130           0                 0                0
## 122                 138           0                 0                0
## 123                 112           0                 0                0
## 124                 108           0                 0                0
## 125                  94           0                 0                0
## 126                 118           0                 0                0
## 127                 112           0                 0                0
## 128                 152           0                 0                0
## 129                 136           0                 0                0
## 130                 120           0                 0                0
## 131                 160           0                 0                0
## 132                 134           0                 0                0
## 133                 120           0                 0                0
## 134                 110           0                 0                0
## 135                 126           0                 0                0
## 136                 130           0                 0                0
## 137                 120           0                 0                0
## 138                 128           0                 0                0
## 139                 110           0                 0                0
## 140                 128           0                 0                0
## 141                 120           0                 0                0
## 142                 115           0                 0                0
## 143                 120           0                 0                0
## 144                 106           0                 0                0
## 145                 140           0                 0                0
## 146                 156           0                 0                0
## 147                 118           0                 0                0
## 148                 150           0                 0                0
## 149                 120           0                 0                0
## 150                 130           0                 0                0
## 151                 160           0                 0                0
## 152                 112           0                 0                0
## 153                 170           0                 0                0
## 154                 146           0                 0                0
## 155                 138           0                 0                0
## 156                 130           0                 0                0
## 157                 130           0                 0                0
## 158                 122           0                 0                0
## 159                 125           1                 0                0
## 160                 130           0                 0                0
## 161                 120           0                 0                0
## 162                 132           0                 0                0
## 163                 120           0                 0                0
## 164                 138           1                 0                0
## 165                 138           1                 0                0
## 166                 160           1                 0                0
## 167                 120           0                 0                0
## 168                 140           0                 0                0
## 169                 130           0                 0                0
## 170                 140           0                 0                0
## 171                 130           0                 0                0
## 172                 110           0                 0                0
## 173                 120           0                 0                0
## 174                 132           0                 0                0
## 175                 130           0                 0                0
## 176                 110           0                 0                0
## 177                 117           0                 0                0
## 178                 140           0                 0                0
## 179                 120           0                 0                0
## 180                 150           0                 0                0
## 181                 132           0                 0                0
## 182                 150           1                 0                0
## 183                 130           0                 0                0
## 184                 112           0                 0                0
## 185                 150           0                 0                0
## 186                 112           0                 0                0
## 187                 130           0                 0                0
## 188                 124           0                 0                0
## 189                 140           0                 0                0
## 190                 110           0                 0                0
## 191                 130           0                 0                0
## 192                 128           1                 0                0
## 193                 120           0                 0                0
## 194                 145           0                 0                0
## 195                 140           0                 0                0
## 196                 170           0                 0                0
## 197                 150           0                 0                0
## 198                 125           0                 0                0
## 199                 120           0                 0                0
## 200                 110           0                 0                0
## 201                 110           0                 0                0
## 202                 125           0                 0                0
## 203                 150           0                 0                0
## 204                 152           0                 1                0
## 205                 160           1                 0                1
## 206                 128           0                 0                0
## 207                 110           0                 0                0
## 208                 150           0                 0                0
## 209                 120           1                 0                0
## 210                 140           0                 0                0
## 211                 128           0                 0                0
## 212                 120           0                 0                0
## 213                 118           0                 0                0
## 214                 145           0                 0                0
## 215                 125           0                 0                0
## 216                 132           0                 0                0
## 217                 130           0                 0                0
## 218                 130           1                 0                0
## 219                 135           0                 0                0
## 220                 130           0                 0                0
## 221                 150           1                 0                0
## 222                 140           0                 0                1
## 223                 138           0                 0                0
## 224                 152           0                 1                0
## 225                 110           0                 0                0
## 226                 145           0                 0                0
## 227                 120           0                 0                0
## 228                 120           0                 0                0
## 229                 170           0                 0                0
## 230                 125           0                 0                0
## 231                 108           0                 0                0
## 232                 165           1                 0                0
## 233                 160           0                 0                0
## 234                 120           0                 0                0
## 235                 130           1                 0                0
## 236                 140           0                 0                0
## 237                 125           0                 0                0
## 238                 140           0                 0                0
## 239                 125           1                 0                0
## 240                 126           0                 0                0
## 241                 160           0                 0                0
## 242                 152           0                 1                0
## 243                 145           0                 0                0
## 244                 152           0                 0                0
## 245                 132           0                 0                0
## 246                 124           0                 0                0
## 247                 134           0                 0                0
## 248                 160           1                 0                0
## 249                 152           0                 1                0
## 250                 140           1                 0                0
## 251                 140           1                 0                1
## 252                 132           1                 0                0
## 253                 138           1                 0                0
## 254                 100           0                 0                0
## 255                 160           0                 0                0
## 256                 142           1                 0                0
## 257                 128           0                 0                0
## 258                 144           0                 0                0
## 259                 150           0                 0                0
## 260                 120           0                 0                0
## 261                 152           0                 1                0
## 262                 112           0                 0                0
## 263                 123           0                 0                0
## 264                 108           0                 0                0
## 265                 110           0                 0                0
## 266                 112           0                 0                0
## 267                 152           0                 1                0
## 268                 118           1                 0                0
## 269                 122           0                 0                0
## 270                 130           0                 0                0
## 271                 120           0                 0                0
## 272                 134           0                 0                0
## 273                 120           0                 0                0
## 274                 100           0                 0                0
## 275                 110           0                 0                0
## 276                 125           0                 0                0
## 277                 146           0                 0                0
## 278                 124           0                 0                0
## 279                 136           0                 0                0
## 280                 138           0                 0                0
## 281                 136           0                 0                0
## 282                 128           0                 0                0
## 283                 126           0                 0                0
## 284                 152           0                 0                0
## 285                 140           0                 0                0
## 286                 140           0                 0                0
## 287                 134           0                 0                0
## 288                 154           0                 0                0
## 289                 110           0                 0                0
## 290                 128           0                 0                0
## 291                 148           0                 0                0
## 292                 114           1                 0                1
## 293                 170           0                 0                0
## 294                 152           0                 0                0
## 295                 120           0                 0                0
## 296                 140           0                 0                0
## 297                 124           0                 0                0
## 298                 164           0                 0                0
## 299                 140           0                 0                0
## 300                 110           0                 0                0
## 301                 144           0                 0                0
## 302                 130           0                 0                0
## 303                 130           0                 0                0
##     Out_flag_thalach
## 1                  0
## 2                  0
## 3                  0
## 4                  0
## 5                  0
## 6                  0
## 7                  0
## 8                  0
## 9                  0
## 10                 0
## 11                 0
## 12                 0
## 13                 0
## 14                 0
## 15                 0
## 16                 0
## 17                 0
## 18                 0
## 19                 0
## 20                 0
## 21                 0
## 22                 0
## 23                 0
## 24                 0
## 25                 0
## 26                 0
## 27                 0
## 28                 0
## 29                 0
## 30                 0
## 31                 0
## 32                 0
## 33                 0
## 34                 0
## 35                 0
## 36                 0
## 37                 0
## 38                 0
## 39                 0
## 40                 0
## 41                 0
## 42                 0
## 43                 0
## 44                 0
## 45                 0
## 46                 0
## 47                 0
## 48                 0
## 49                 0
## 50                 0
## 51                 0
## 52                 0
## 53                 0
## 54                 0
## 55                 0
## 56                 0
## 57                 0
## 58                 0
## 59                 0
## 60                 0
## 61                 0
## 62                 0
## 63                 0
## 64                 0
## 65                 0
## 66                 0
## 67                 0
## 68                 0
## 69                 0
## 70                 0
## 71                 0
## 72                 0
## 73                 0
## 74                 0
## 75                 0
## 76                 0
## 77                 0
## 78                 0
## 79                 0
## 80                 0
## 81                 0
## 82                 0
## 83                 0
## 84                 0
## 85                 0
## 86                 0
## 87                 0
## 88                 0
## 89                 0
## 90                 0
## 91                 0
## 92                 0
## 93                 0
## 94                 0
## 95                 0
## 96                 0
## 97                 0
## 98                 0
## 99                 0
## 100                0
## 101                0
## 102                0
## 103                0
## 104                0
## 105                0
## 106                0
## 107                0
## 108                0
## 109                0
## 110                0
## 111                0
## 112                0
## 113                0
## 114                0
## 115                0
## 116                0
## 117                0
## 118                0
## 119                0
## 120                0
## 121                0
## 122                0
## 123                0
## 124                0
## 125                0
## 126                0
## 127                0
## 128                0
## 129                0
## 130                0
## 131                0
## 132                0
## 133                0
## 134                0
## 135                0
## 136                0
## 137                0
## 138                0
## 139                0
## 140                0
## 141                0
## 142                0
## 143                0
## 144                0
## 145                0
## 146                0
## 147                0
## 148                0
## 149                0
## 150                0
## 151                0
## 152                0
## 153                0
## 154                0
## 155                0
## 156                0
## 157                0
## 158                0
## 159                0
## 160                0
## 161                0
## 162                0
## 163                0
## 164                0
## 165                0
## 166                0
## 167                0
## 168                0
## 169                0
## 170                0
## 171                0
## 172                0
## 173                0
## 174                0
## 175                0
## 176                0
## 177                0
## 178                0
## 179                0
## 180                0
## 181                0
## 182                0
## 183                0
## 184                0
## 185                0
## 186                0
## 187                0
## 188                0
## 189                0
## 190                0
## 191                0
## 192                0
## 193                0
## 194                0
## 195                0
## 196                0
## 197                0
## 198                0
## 199                0
## 200                0
## 201                0
## 202                0
## 203                0
## 204                0
## 205                0
## 206                0
## 207                0
## 208                0
## 209                0
## 210                0
## 211                0
## 212                0
## 213                0
## 214                0
## 215                0
## 216                0
## 217                0
## 218                0
## 219                0
## 220                0
## 221                0
## 222                0
## 223                0
## 224                0
## 225                0
## 226                0
## 227                0
## 228                0
## 229                0
## 230                0
## 231                0
## 232                0
## 233                0
## 234                0
## 235                0
## 236                0
## 237                0
## 238                0
## 239                0
## 240                0
## 241                0
## 242                0
## 243                0
## 244                0
## 245                0
## 246                0
## 247                0
## 248                0
## 249                0
## 250                0
## 251                0
## 252                0
## 253                0
## 254                0
## 255                0
## 256                0
## 257                0
## 258                0
## 259                0
## 260                0
## 261                0
## 262                0
## 263                0
## 264                0
## 265                0
## 266                0
## 267                0
## 268                0
## 269                0
## 270                0
## 271                0
## 272                0
## 273                1
## 274                0
## 275                0
## 276                0
## 277                0
## 278                0
## 279                0
## 280                0
## 281                0
## 282                0
## 283                0
## 284                0
## 285                0
## 286                0
## 287                0
## 288                0
## 289                0
## 290                0
## 291                0
## 292                0
## 293                0
## 294                0
## 295                0
## 296                0
## 297                0
## 298                0
## 299                0
## 300                0
## 301                0
## 302                0
## 303                0
## 
## $raw_list
## $raw_list$Num_Correlation
##                     Out_flag_trestbps Out_flag_chol Out_flag_thalach
## Out_flag_trestbps          1.00000000  -0.022663368    -0.0100680211
## Out_flag_chol             -0.02266337   1.000000000    -0.0074537256
## Out_flag_thalach          -0.01006802  -0.007453726     1.0000000000
## Out_flag_oldpeak           0.12993665  -0.016778523    -0.0074537256
## Out_flag_ca               -0.05246808   0.055313924    -0.0172561590
## Out_flag_thal             -0.01426196  -0.010558655    -0.0046905987
## Out_caping_age             0.09370172   0.117625503     0.0801783926
## Out_caping_cp             -0.01326350  -0.020994272    -0.0540054485
## Out_caping_trestbps        0.23904784   0.042083987    -0.0397495571
## Out_caping_chol            0.10521191   0.184413558    -0.0090305068
## Out_caping_thalach         0.01368787   0.033418192    -0.0864342988
## Out_caping_oldpeak         0.07774586   0.108920128    -0.0002496928
## Out_caping_ca             -0.01624881   0.059440314    -0.0450314670
## Out_caping_thal            0.10218254   0.060813372    -0.0323015678
## age                        0.09370172   0.117625503     0.0801783926
## cp                        -0.01326350  -0.020994272    -0.0540054485
## trestbps                   0.49895226   0.030895577    -0.0382012428
## chol                       0.08514142   0.480467030    -0.0103021212
## thalach                    0.01460386   0.033721518    -0.1979075827
## oldpeak                    0.08961768   0.096146357    -0.0019660416
## ca                        -0.02978860   0.059712206    -0.0411107618
## thal                       0.10107855   0.060704965    -0.0295153374
##                     Out_flag_oldpeak Out_flag_ca Out_flag_thal Out_caping_age
## Out_flag_trestbps        0.129936646 -0.05246808  -0.014261964     0.09370172
## Out_flag_chol           -0.016778523  0.05531392  -0.010558655     0.11762550
## Out_flag_thalach        -0.007453726 -0.01725616  -0.004690599     0.08017839
## Out_flag_oldpeak         1.000000000  0.24362987  -0.010558655     0.03762432
## Out_flag_ca              0.243629866  1.00000000  -0.024444399     0.08975013
## Out_flag_thal           -0.010558655 -0.02444440   1.000000000    -0.01677850
## Out_caping_age           0.037624319  0.08975013  -0.016778504     1.00000000
## Out_caping_cp           -0.046137609 -0.07188774   0.002610990    -0.06865302
## Out_caping_trestbps      0.087047955  0.10822403  -0.014388199     0.28609494
## Out_caping_chol          0.026437560  0.03897140  -0.061242954     0.19503652
## Out_caping_thalach      -0.098996740 -0.13428926  -0.051791644    -0.39584459
## Out_caping_oldpeak       0.218402320  0.07079485  -0.038629645     0.21654631
## Out_caping_ca            0.091601769  0.50989635  -0.063789811     0.33891920
## Out_caping_thal          0.060813372  0.07896446  -0.045757135     0.06674531
## age                      0.037624319  0.08975013  -0.016778504     1.00000000
## cp                      -0.046137609 -0.07188774   0.002610990    -0.06865302
## trestbps                 0.109313796  0.08111764  -0.016870413     0.27935091
## chol                     0.017863249  0.04460068  -0.057126565     0.21367796
## thalach                 -0.096561916 -0.13017998  -0.050428545    -0.39852194
## oldpeak                  0.433621176  0.12221131  -0.037945863     0.21001257
## ca                       0.135838988  0.72571175  -0.058235894     0.27632624
## thal                     0.060704965  0.08166770  -0.308515783     0.06800138
##                     Out_caping_cp Out_caping_trestbps Out_caping_chol
## Out_flag_trestbps     -0.01326350          0.23904784     0.105211909
## Out_flag_chol         -0.02099427          0.04208399     0.184413558
## Out_flag_thalach      -0.05400545         -0.03974956    -0.009030507
## Out_flag_oldpeak      -0.04613761          0.08704796     0.026437560
## Out_flag_ca           -0.07188774          0.10822403     0.038971398
## Out_flag_thal          0.00261099         -0.01438820    -0.061242954
## Out_caping_age        -0.06865302          0.28609494     0.195036524
## Out_caping_cp          1.00000000          0.06248375    -0.094737023
## Out_caping_trestbps    0.06248375          1.00000000     0.120749530
## Out_caping_chol       -0.09473702          0.12074953     1.000000000
## Out_caping_thalach     0.29440590         -0.06374981    -0.027162750
## Out_caping_oldpeak    -0.14425156          0.16860759     0.040353556
## Out_caping_ca         -0.21352424          0.10470292     0.092940114
## Out_caping_thal       -0.16912518          0.03140390     0.069858398
## age                   -0.06865302          0.28609494     0.195036524
## cp                     1.00000000          0.06248375    -0.094737023
## trestbps               0.04760776          0.95696797     0.142717481
## chol                  -0.07690439          0.10595303     0.936611241
## thalach                0.29576212         -0.05823730    -0.025706283
## oldpeak               -0.14923016          0.18074563     0.029637925
## ca                    -0.18105303          0.11536664     0.070977505
## thal                  -0.16173557          0.03371540     0.082746344
##                     Out_caping_thalach Out_caping_oldpeak Out_caping_ca
## Out_flag_trestbps           0.01368787       0.0777458569   -0.01624881
## Out_flag_chol               0.03341819       0.1089201275    0.05944031
## Out_flag_thalach           -0.08643430      -0.0002496928   -0.04503147
## Out_flag_oldpeak           -0.09899674       0.2184023198    0.09160177
## Out_flag_ca                -0.13428926       0.0707948451    0.50989635
## Out_flag_thal              -0.05179164      -0.0386296446   -0.06378981
## Out_caping_age             -0.39584459       0.2165463104    0.33891920
## Out_caping_cp               0.29440590      -0.1442515605   -0.21352424
## Out_caping_trestbps        -0.06374981       0.1686075901    0.10470292
## Out_caping_chol            -0.02716275       0.0403535561    0.09294011
## Out_caping_thalach          1.00000000      -0.3554011953   -0.24436796
## Out_caping_oldpeak         -0.35540120       1.0000000000    0.25632950
## Out_caping_ca              -0.24436796       0.2563294954    1.00000000
## Out_caping_thal            -0.12090170       0.2078999712    0.15200399
## age                        -0.39584459       0.2165463104    0.33891920
## cp                          0.29440590      -0.1442515605   -0.21352424
## trestbps                   -0.05184383       0.1805269770    0.09778060
## chol                       -0.01128423       0.0671893275    0.08928128
## thalach                     0.99365826      -0.3496520810   -0.23535189
## oldpeak                    -0.35004353       0.9695011702    0.25709347
## ca                         -0.22138047       0.2075930445    0.95390701
## thal                       -0.10140266       0.2082005341    0.16164152
##                     Out_caping_thal         age          cp    trestbps
## Out_flag_trestbps        0.10218254  0.09370172 -0.01326350  0.49895226
## Out_flag_chol            0.06081337  0.11762550 -0.02099427  0.03089558
## Out_flag_thalach        -0.03230157  0.08017839 -0.05400545 -0.03820124
## Out_flag_oldpeak         0.06081337  0.03762432 -0.04613761  0.10931380
## Out_flag_ca              0.07896446  0.08975013 -0.07188774  0.08111764
## Out_flag_thal           -0.04575713 -0.01677850  0.00261099 -0.01687041
## Out_caping_age           0.06674531  1.00000000 -0.06865302  0.27935091
## Out_caping_cp           -0.16912518 -0.06865302  1.00000000  0.04760776
## Out_caping_trestbps      0.03140390  0.28609494  0.06248375  0.95696797
## Out_caping_chol          0.06985840  0.19503652 -0.09473702  0.14271748
## Out_caping_thalach      -0.12090170 -0.39584459  0.29440590 -0.05184383
## Out_caping_oldpeak       0.20789997  0.21654631 -0.14425156  0.18052698
## Out_caping_ca            0.15200399  0.33891920 -0.21352424  0.09778060
## Out_caping_thal          1.00000000  0.06674531 -0.16912518  0.06063763
## age                      0.06674531  1.00000000 -0.06865302  0.27935091
## cp                      -0.16912518 -0.06865302  1.00000000  0.04760776
## trestbps                 0.06063763  0.27935091  0.04760776  1.00000000
## chol                     0.08786613  0.21367796 -0.07690439  0.12317421
## thalach                 -0.11530982 -0.39852194  0.29576212 -0.04669773
## oldpeak                  0.21023637  0.21001257 -0.14923016  0.19321647
## ca                       0.14324768  0.27632624 -0.18105303  0.10138899
## thal                     0.96433971  0.06800138 -0.16173557  0.06220989
##                             chol      thalach      oldpeak          ca
## Out_flag_trestbps    0.085141416  0.014603861  0.089617678 -0.02978860
## Out_flag_chol        0.480467030  0.033721518  0.096146357  0.05971221
## Out_flag_thalach    -0.010302121 -0.197907583 -0.001966042 -0.04111076
## Out_flag_oldpeak     0.017863249 -0.096561916  0.433621176  0.13583899
## Out_flag_ca          0.044600684 -0.130179980  0.122211314  0.72571175
## Out_flag_thal       -0.057126565 -0.050428545 -0.037945863 -0.05823589
## Out_caping_age       0.213677957 -0.398521938  0.210012567  0.27632624
## Out_caping_cp       -0.076904391  0.295762125 -0.149230158 -0.18105303
## Out_caping_trestbps  0.105953030 -0.058237300  0.180745630  0.11536664
## Out_caping_chol      0.936611241 -0.025706283  0.029637925  0.07097750
## Out_caping_thalach  -0.011284227  0.993658263 -0.350043534 -0.22138047
## Out_caping_oldpeak   0.067189327 -0.349652081  0.969501170  0.20759304
## Out_caping_ca        0.089281283 -0.235351886  0.257093470  0.95390701
## Out_caping_thal      0.087866134 -0.115309824  0.210236369  0.14324768
## age                  0.213677957 -0.398521938  0.210012567  0.27632624
## cp                  -0.076904391  0.295762125 -0.149230158 -0.18105303
## trestbps             0.123174207 -0.046697728  0.193216472  0.10138899
## chol                 1.000000000 -0.009939839  0.053951920  0.07051093
## thalach             -0.009939839  1.000000000 -0.344186948 -0.21317693
## oldpeak              0.053951920 -0.344186948  1.000000000  0.22268232
## ca                   0.070510925 -0.213176928  0.222682322  1.00000000
## thal                 0.098802993 -0.096439132  0.210244126  0.15183213
##                            thal
## Out_flag_trestbps    0.10107855
## Out_flag_chol        0.06070497
## Out_flag_thalach    -0.02951534
## Out_flag_oldpeak     0.06070497
## Out_flag_ca          0.08166770
## Out_flag_thal       -0.30851578
## Out_caping_age       0.06800138
## Out_caping_cp       -0.16173557
## Out_caping_trestbps  0.03371540
## Out_caping_chol      0.08274634
## Out_caping_thalach  -0.10140266
## Out_caping_oldpeak   0.20820053
## Out_caping_ca        0.16164152
## Out_caping_thal      0.96433971
## age                  0.06800138
## cp                  -0.16173557
## trestbps             0.06220989
## chol                 0.09880299
## thalach             -0.09643913
## oldpeak              0.21024413
## ca                   0.15183213
## thal                 1.00000000
## 
## $raw_list$AUC_value
##                           auc             varName          imp
## cp                  0.7486386                  cp 0.2486385595
## Out_caping_thalach  0.7479798  Out_caping_thalach 0.2479797980
## Out_caping_oldpeak  0.2595301  Out_caping_oldpeak 0.2404699166
## Out_caping_ca       0.2600351       Out_caping_ca 0.2399648661
## oldpeak             0.2600791             oldpeak 0.2399209486
## ca                  0.2634607                  ca 0.2365393061
## Out_caping_thal     0.2920290     Out_caping_thal 0.2079710145
## thal                0.2938296                thal 0.2061703996
## age                 0.3619016                 age 0.1380983751
## Out_caping_chol     0.4288757     Out_caping_chol 0.0711242863
## trestbps            0.4297101            trestbps 0.0702898551
## chol                0.4299297                chol 0.0700702679
## Out_caping_trestbps 0.4305007 Out_caping_trestbps 0.0694993412
## Out_flag_ca         0.4559947         Out_flag_ca 0.0440052701
## Out_flag_trestbps   0.4873518   Out_flag_trestbps 0.0126482213
## Out_flag_oldpeak    0.4885375    Out_flag_oldpeak 0.0114624506
## Out_flag_thalach    0.4963768    Out_flag_thalach 0.0036231884
## Out_flag_chol       0.5018445       Out_flag_chol 0.0018445323
## Out_flag_thal       0.4994071       Out_flag_thal 0.0005928854
## 
## 
## $var_list
## $var_list$All_columns
##  [1] "age"        "sex"        "cp"         "trestbps"   "chol"      
##  [6] "fbs"        "restecg"    "thalach"    "exang"      "oldpeak"   
## [11] "slope"      "ca"         "thal"       "target_var"
## 
## $var_list$Numeric_col
## [1] "age"      "cp"       "trestbps" "chol"     "thalach"  "oldpeak"  "ca"      
## [8] "thal"    
## 
## $var_list$Character_col
## character(0)
## 
## $var_list$Factor_col
## character(0)
## 
## $var_list$Logical_col
## character(0)
## 
## $var_list$Date_col
## character(0)
## 
## $var_list$Unique_col
## character(0)
## 
## $var_list$MAR_col
## character(0)
## 
## $var_list$Dummy_col
## NULL
## 
## $var_list$Dropped_col
## [1] "sex"        "fbs"        "restecg"    "exang"      "slope"     
## [6] "target_var"
## 
## $var_list$Low_auc_col
## [1] "Out_flag_chol" "Out_flag_thal"
## 
## $var_list$first_set_var
## $var_list$first_set_var$A
## character(0)
## 
## $var_list$first_set_var$B
## character(0)
## 
## $var_list$first_set_var$C
## [1] "sex"        "fbs"        "restecg"    "exang"      "slope"     
## [6] "target_var"
## 
## $var_list$first_set_var$D
## [1] "age"      "cp"       "trestbps" "chol"     "thalach"  "oldpeak"  "ca"      
## [8] "thal"    
## 
## $var_list$first_set_var$E
## [1] "sex"     "fbs"     "restecg" "exang"   "slope"  
## 
## $var_list$first_set_var$F
## character(0)
## 
## $var_list$first_set_var$G
## character(0)
## 
## $var_list$first_set_var$H
## [1] FALSE
## 
## $var_list$first_set_var$I
## character(0)
## 
## 
## $var_list$final_var_list
##  [1] "cp"                  "Out_caping_thalach"  "Out_caping_oldpeak" 
##  [4] "Out_caping_ca"       "oldpeak"             "ca"                 
##  [7] "Out_caping_thal"     "thal"                "age"                
## [10] "Out_caping_chol"     "trestbps"            "chol"               
## [13] "Out_caping_trestbps" "Out_flag_ca"         "Out_flag_trestbps"  
## [16] "Out_flag_oldpeak"    "Out_flag_thalach"   
## 
## $var_list$cor_var
## [1] "Out_caping_age" "thalach"        "Out_caping_cp" 
## 
## $var_list$auc_var
##  [1] "cp"                  "Out_caping_thalach"  "Out_caping_oldpeak" 
##  [4] "Out_caping_ca"       "oldpeak"             "ca"                 
##  [7] "Out_caping_thal"     "thal"                "age"                
## [10] "Out_caping_chol"     "trestbps"            "chol"               
## [13] "Out_caping_trestbps" "Out_flag_ca"         "Out_flag_trestbps"  
## [16] "Out_flag_oldpeak"    "Out_flag_thalach"   
## 
## $var_list$overall_variable
##  [1] "age"                 "cp"                  "trestbps"           
##  [4] "chol"                "thalach"             "oldpeak"            
##  [7] "ca"                  "thal"                "Out_flag_trestbps"  
## [10] "Out_flag_chol"       "Out_flag_thalach"    "Out_flag_oldpeak"   
## [13] "Out_flag_ca"         "Out_flag_thal"       "Out_caping_age"     
## [16] "Out_caping_cp"       "Out_caping_trestbps" "Out_caping_chol"    
## [19] "Out_caping_thalach"  "Out_caping_oldpeak"  "Out_caping_ca"      
## [22] "Out_caping_thal"    
## 
## $var_list$zerovariance
## character(0)
## 
## $var_list$outlier_summary
##  [1] "Out_flag_trestbps"   "Out_flag_chol"       "Out_flag_thalach"   
##  [4] "Out_flag_oldpeak"    "Out_flag_ca"         "Out_flag_thal"      
##  [7] "Out_caping_age"      "Out_caping_cp"       "Out_caping_trestbps"
## [10] "Out_caping_chol"     "Out_caping_thalach"  "Out_caping_oldpeak" 
## [13] "Out_caping_ca"       "Out_caping_thal"    
## 
## 
## attr(,"class")
## [1] "autoDataprep"
train_data <- dateprep$master_data

3.3 Machine learning models using autoMLmodel

Automated training, tuning and validation of machine learning models. This function includes the following binary classification techniques

+ Logistic regression - logreg
+ Regularised regression - glmnet
+ Extreme gradient boosting - xgboost
+ Random forest - randomForest
+ Random forest - ranger
+ Decision tree - rpart
mymodel <- autoMLmodel( train = heart,
                        test = NULL,
                        target = 'target_var',
                        testSplit = 0.2,
                        tuneIters = 100,
                        tuneType = "random",
                        models = "all",
                        varImp = 10,
                        liftGroup = 50,
                        maxObs = 4000,
                        uid = NULL,
                        htmlreport = FALSE,
                        seed = 1991)

3.3 Model output

Model performance

Model Fitting time Scoring time Train AUC Test AUC Accuracy Precision Recall F1_score
glmnet 2.165 secs 0.007 secs 0.928 0.908 0.820 0.824 0.848 0.836
logreg 2.011 secs 0.004 secs 0.929 0.906 0.820 0.824 0.848 0.836
randomForest 2.257 secs 0.011 secs 1.000 0.874 0.770 0.771 0.818 0.794
ranger 2.312 secs 0.046 secs 1.000 0.896 0.787 0.778 0.848 0.812
xgboost 2.927 secs 0.005 secs 1.000 0.874 0.770 0.757 0.848 0.800
rpart 1.922 secs 0.004 secs 0.927 0.814 0.738 0.730 0.818 0.771

Randomforest model Receiver Operating Characteristic (ROC) and the variable Importance

Training dataset ROC

TrainROC <- mymodel$trainedModels$randomForest$modelPlots$TrainROC
TrainROC

Test dataset ROC

TestROC <- mymodel$trainedModels$randomForest$modelPlots$TestROC
TestROC

Variable importance

VarImp <- mymodel$trainedModels$randomForest$modelPlots$VarImp
VarImp
## [[1]]

Threshold

Threshold <- mymodel$trainedModels$randomForest$modelPlots$Threshold
Threshold