diff --git a/notebooks/_build/.doctrees/analysis.doctree b/notebooks/_build/.doctrees/analysis.doctree index 49be21d..8b7fb9f 100644 Binary files a/notebooks/_build/.doctrees/analysis.doctree and b/notebooks/_build/.doctrees/analysis.doctree differ diff --git a/notebooks/_build/.doctrees/environment.pickle b/notebooks/_build/.doctrees/environment.pickle index dd00b2b..93e4a79 100644 Binary files a/notebooks/_build/.doctrees/environment.pickle and b/notebooks/_build/.doctrees/environment.pickle differ diff --git a/notebooks/_build/html/_sources/analysis.ipynb b/notebooks/_build/html/_sources/analysis.ipynb index 02d70b8..b4dd8e3 100644 --- a/notebooks/_build/html/_sources/analysis.ipynb +++ b/notebooks/_build/html/_sources/analysis.ipynb @@ -63,7 +63,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 25, "metadata": { "tags": [ "remove-input" @@ -149,6 +149,7 @@ } ], "source": [ + "library(tidyverse)\n", "heart_data <- read_csv('../data/processed/heart_data.csv', show_col_types = FALSE)\n", "head(heart_data)" ] diff --git a/notebooks/_build/html/analysis.html b/notebooks/_build/html/analysis.html index 3c6e8f2..4aff518 100644 --- a/notebooks/_build/html/analysis.html +++ b/notebooks/_build/html/analysis.html @@ -381,11 +381,36 @@

Preliminary Exploratory Data AnalysisWe combined the datasets “processed.switzerland.data,” “processed.va.data”, “processed.cleveland.data,” and “processed.hungarian.data”, to generate a longer and more complete dataset. Our complete aggregated data contains 13 different columns with an additional 8 that repeat some of the variables as factors instead of numeric types. Based on initial viewing of the data we decided to eliminate the ST_dep and slope columns as they were missing too many points.

-
Error in read_csv("../data/processed/heart_data.csv", show_col_types = FALSE): could not find function "read_csv"
-Traceback:
+
── Attaching packages ──────────────────────────────────────────────────────────────────────────────────── tidyverse 1.3.2 ──
 
+
 ggplot2 3.3.6       purrr   0.3.5 
+ tibble  3.1.8       dplyr   1.0.10
+ tidyr   1.2.1       stringr 1.4.1 
+ readr   2.1.3       forcats 0.5.2 
+
+
── Conflicts ─────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
+ dplyr::filter() masks stats::filter()
+ dplyr::lag()    masks stats::lag()
+
+
+
+ + + + + + + + + + + + + +
A tibble: 6 × 21
placeagesexchest_painrest_bpcholestoral_mmHgfasting_bsrest_ECGmax_heart_rateexercisethaldiagnosissex_fchest_pain_ffasting_bs_frest_ECG_fexercise_fmajor_vessels_fthal_fdiagnosis_f
<chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>
switzerland3211 950NA 01270NA111NA 00NANA1
switzerland34141150NANA1540NA114NANA0NANA1
switzerland3514 NA0NA 01301 7314NA 01NA 73
switzerland36141100NA 01251 6114NA 01NA 61
switzerland38041050NA 01660NA204NA 00NANA2
switzerland38041100 0 01560 3104 0 00NA 31
+

Table 1. All columns with all data from the four heart disease data sets.

@@ -534,10 +559,24 @@

Classification ModelTesting the Model\n", + "A tibble: 6 × 21\n", + "\n", + "\tplaceagesexchest_painrest_bpcholestoral_mmHgfasting_bsrest_ECGmax_heart_rateexercise⋯thaldiagnosissex_fchest_pain_ffasting_bs_frest_ECG_fexercise_fmajor_vessels_fthal_fdiagnosis_f\n", + "\t<chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>⋯<dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>\n", + "\n", + "\n", + "\tswitzerland3211 950NA 01270⋯NA111NA 00NANA1\n", + "\tswitzerland34141150NANA1540⋯NA114NANA0NANA1\n", + "\tswitzerland3514 NA0NA 01301⋯ 7314NA 01NA 73\n", + "\tswitzerland36141100NA 01251⋯ 6114NA 01NA 61\n", + "\tswitzerland38041050NA 01660⋯NA204NA 00NANA2\n", + "\tswitzerland38041100 0 01560⋯ 3104 0 00NA 31\n", + "\n", + "\n" + ], + "text/latex": [ + "A tibble: 6 × 21\n", + "\\begin{tabular}{lllllllllllllllllllll}\n", + " place & age & sex & chest\\_pain & rest\\_bp & cholestoral\\_mmHg & fasting\\_bs & rest\\_ECG & max\\_heart\\_rate & exercise & ⋯ & thal & diagnosis & sex\\_f & chest\\_pain\\_f & fasting\\_bs\\_f & rest\\_ECG\\_f & exercise\\_f & major\\_vessels\\_f & thal\\_f & diagnosis\\_f\\\\\n", + " & & & & & & & & & & ⋯ & & & & & & & & & & \\\\\n", + "\\hline\n", + "\t switzerland & 32 & 1 & 1 & 95 & 0 & NA & 0 & 127 & 0 & ⋯ & NA & 1 & 1 & 1 & NA & 0 & 0 & NA & NA & 1\\\\\n", + "\t switzerland & 34 & 1 & 4 & 115 & 0 & NA & NA & 154 & 0 & ⋯ & NA & 1 & 1 & 4 & NA & NA & 0 & NA & NA & 1\\\\\n", + "\t switzerland & 35 & 1 & 4 & NA & 0 & NA & 0 & 130 & 1 & ⋯ & 7 & 3 & 1 & 4 & NA & 0 & 1 & NA & 7 & 3\\\\\n", + "\t switzerland & 36 & 1 & 4 & 110 & 0 & NA & 0 & 125 & 1 & ⋯ & 6 & 1 & 1 & 4 & NA & 0 & 1 & NA & 6 & 1\\\\\n", + "\t switzerland & 38 & 0 & 4 & 105 & 0 & NA & 0 & 166 & 0 & ⋯ & NA & 2 & 0 & 4 & NA & 0 & 0 & NA & NA & 2\\\\\n", + "\t switzerland & 38 & 0 & 4 & 110 & 0 & 0 & 0 & 156 & 0 & ⋯ & 3 & 1 & 0 & 4 & 0 & 0 & 0 & NA & 3 & 1\\\\\n", + "\\end{tabular}\n" + ], + "text/markdown": [ + "\n", + "A tibble: 6 × 21\n", + "\n", + "| place <chr> | age <dbl> | sex <dbl> | chest_pain <dbl> | rest_bp <dbl> | cholestoral_mmHg <dbl> | fasting_bs <dbl> | rest_ECG <dbl> | max_heart_rate <dbl> | exercise <dbl> | ⋯ ⋯ | thal <dbl> | diagnosis <dbl> | sex_f <dbl> | chest_pain_f <dbl> | fasting_bs_f <dbl> | rest_ECG_f <dbl> | exercise_f <dbl> | major_vessels_f <dbl> | thal_f <dbl> | diagnosis_f <dbl> |\n", + "|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|\n", + "| switzerland | 32 | 1 | 1 | 95 | 0 | NA | 0 | 127 | 0 | ⋯ | NA | 1 | 1 | 1 | NA | 0 | 0 | NA | NA | 1 |\n", + "| switzerland | 34 | 1 | 4 | 115 | 0 | NA | NA | 154 | 0 | ⋯ | NA | 1 | 1 | 4 | NA | NA | 0 | NA | NA | 1 |\n", + "| switzerland | 35 | 1 | 4 | NA | 0 | NA | 0 | 130 | 1 | ⋯ | 7 | 3 | 1 | 4 | NA | 0 | 1 | NA | 7 | 3 |\n", + "| switzerland | 36 | 1 | 4 | 110 | 0 | NA | 0 | 125 | 1 | ⋯ | 6 | 1 | 1 | 4 | NA | 0 | 1 | NA | 6 | 1 |\n", + "| switzerland | 38 | 0 | 4 | 105 | 0 | NA | 0 | 166 | 0 | ⋯ | NA | 2 | 0 | 4 | NA | 0 | 0 | NA | NA | 2 |\n", + "| switzerland | 38 | 0 | 4 | 110 | 0 | 0 | 0 | 156 | 0 | ⋯ | 3 | 1 | 0 | 4 | 0 | 0 | 0 | NA | 3 | 1 |\n", + "\n" + ], + "text/plain": [ + " place age sex chest_pain rest_bp cholestoral_mmHg fasting_bs rest_ECG\n", + "1 switzerland 32 1 1 95 0 NA 0 \n", + "2 switzerland 34 1 4 115 0 NA NA \n", + "3 switzerland 35 1 4 NA 0 NA 0 \n", + "4 switzerland 36 1 4 110 0 NA 0 \n", + "5 switzerland 38 0 4 105 0 NA 0 \n", + "6 switzerland 38 0 4 110 0 0 0 \n", + " max_heart_rate exercise ⋯ thal diagnosis sex_f chest_pain_f fasting_bs_f\n", + "1 127 0 ⋯ NA 1 1 1 NA \n", + "2 154 0 ⋯ NA 1 1 4 NA \n", + "3 130 1 ⋯ 7 3 1 4 NA \n", + "4 125 1 ⋯ 6 1 1 4 NA \n", + "5 166 0 ⋯ NA 2 0 4 NA \n", + "6 156 0 ⋯ 3 1 0 4 0 \n", + " rest_ECG_f exercise_f major_vessels_f thal_f diagnosis_f\n", + "1 0 0 NA NA 1 \n", + "2 NA 0 NA NA 1 \n", + "3 0 1 NA 7 3 \n", + "4 0 1 NA 6 1 \n", + "5 0 0 NA NA 2 \n", + "6 0 0 NA 3 1 " + ] + }, + "metadata": {}, + "output_type": "display_data" } ], "source": [ + "library(tidyverse)\n", "heart_data <- read_csv('../data/processed/heart_data.csv', show_col_types = FALSE)\n", "head(heart_data)" ] @@ -229,7 +322,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 2, "metadata": { "tags": [ "remove-input" @@ -358,7 +451,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 3, "metadata": { "tags": [ "remove-input" @@ -457,7 +550,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 4, "metadata": { "tags": [ "remove-input" @@ -603,7 +696,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 5, "metadata": { "tags": [ "remove-input" @@ -623,10 +716,24 @@ "\t<dbl><chr><chr><dbl><dbl><dbl><chr>\n", "\n", "\n", - "\t1accuracymulticlass0.774132950.0236634Preprocessor1_Model01\n", - "\t2accuracymulticlass0.774132950.0236634Preprocessor1_Model02\n", - "\t3accuracymulticlass0.602946250.0151404Preprocessor1_Model03\n", - "\t⋮⋮⋮⋮⋮⋮⋮\n", + "\t 1accuracymulticlass0.774132950.02366340Preprocessor1_Model01\n", + "\t 2accuracymulticlass0.774132950.02366340Preprocessor1_Model02\n", + "\t 3accuracymulticlass0.602946250.01514040Preprocessor1_Model03\n", + "\t 4accuracymulticlass0.538528150.02673251Preprocessor1_Model04\n", + "\t 5accuracymulticlass0.488798950.02443692Preprocessor1_Model05\n", + "\t 6accuracymulticlass0.473827550.02162800Preprocessor1_Model06\n", + "\t 7accuracymulticlass0.443948650.02178144Preprocessor1_Model07\n", + "\t 8accuracymulticlass0.429318350.02294124Preprocessor1_Model08\n", + "\t 9accuracymulticlass0.412126250.03267083Preprocessor1_Model09\n", + "\t10accuracymulticlass0.399810650.03164645Preprocessor1_Model10\n", + "\t11accuracymulticlass0.394777550.02715977Preprocessor1_Model11\n", + "\t12accuracymulticlass0.377520550.03101980Preprocessor1_Model12\n", + "\t13accuracymulticlass0.360048350.02919724Preprocessor1_Model13\n", + "\t14accuracymulticlass0.367330750.01475960Preprocessor1_Model14\n", + "\t15accuracymulticlass0.369707250.01017029Preprocessor1_Model15\n", + "\t16accuracymulticlass0.379493550.01357445Preprocessor1_Model16\n", + "\t17accuracymulticlass0.377086850.01510417Preprocessor1_Model17\n", + "\t18accuracymulticlass0.389186350.01990557Preprocessor1_Model18\n", "\t19accuracymulticlass0.391624650.02010759Preprocessor1_Model19\n", "\t20accuracymulticlass0.396873850.01765057Preprocessor1_Model20\n", "\t21accuracymulticlass0.389341450.01604878Preprocessor1_Model21\n", @@ -639,10 +746,24 @@ " neighbors & .metric & .estimator & mean & n & std\\_err & .config\\\\\n", " & & & & & & \\\\\n", "\\hline\n", - "\t 1 & accuracy & multiclass & 0.7741329 & 5 & 0.0236634 & Preprocessor1\\_Model01\\\\\n", - "\t 2 & accuracy & multiclass & 0.7741329 & 5 & 0.0236634 & Preprocessor1\\_Model02\\\\\n", - "\t 3 & accuracy & multiclass & 0.6029462 & 5 & 0.0151404 & Preprocessor1\\_Model03\\\\\n", - "\t ⋮ & ⋮ & ⋮ & ⋮ & ⋮ & ⋮ & ⋮\\\\\n", + "\t 1 & accuracy & multiclass & 0.7741329 & 5 & 0.02366340 & Preprocessor1\\_Model01\\\\\n", + "\t 2 & accuracy & multiclass & 0.7741329 & 5 & 0.02366340 & Preprocessor1\\_Model02\\\\\n", + "\t 3 & accuracy & multiclass & 0.6029462 & 5 & 0.01514040 & Preprocessor1\\_Model03\\\\\n", + "\t 4 & accuracy & multiclass & 0.5385281 & 5 & 0.02673251 & Preprocessor1\\_Model04\\\\\n", + "\t 5 & accuracy & multiclass & 0.4887989 & 5 & 0.02443692 & Preprocessor1\\_Model05\\\\\n", + "\t 6 & accuracy & multiclass & 0.4738275 & 5 & 0.02162800 & Preprocessor1\\_Model06\\\\\n", + "\t 7 & accuracy & multiclass & 0.4439486 & 5 & 0.02178144 & Preprocessor1\\_Model07\\\\\n", + "\t 8 & accuracy & multiclass & 0.4293183 & 5 & 0.02294124 & Preprocessor1\\_Model08\\\\\n", + "\t 9 & accuracy & multiclass & 0.4121262 & 5 & 0.03267083 & Preprocessor1\\_Model09\\\\\n", + "\t 10 & accuracy & multiclass & 0.3998106 & 5 & 0.03164645 & Preprocessor1\\_Model10\\\\\n", + "\t 11 & accuracy & multiclass & 0.3947775 & 5 & 0.02715977 & Preprocessor1\\_Model11\\\\\n", + "\t 12 & accuracy & multiclass & 0.3775205 & 5 & 0.03101980 & Preprocessor1\\_Model12\\\\\n", + "\t 13 & accuracy & multiclass & 0.3600483 & 5 & 0.02919724 & Preprocessor1\\_Model13\\\\\n", + "\t 14 & accuracy & multiclass & 0.3673307 & 5 & 0.01475960 & Preprocessor1\\_Model14\\\\\n", + "\t 15 & accuracy & multiclass & 0.3697072 & 5 & 0.01017029 & Preprocessor1\\_Model15\\\\\n", + "\t 16 & accuracy & multiclass & 0.3794935 & 5 & 0.01357445 & Preprocessor1\\_Model16\\\\\n", + "\t 17 & accuracy & multiclass & 0.3770868 & 5 & 0.01510417 & Preprocessor1\\_Model17\\\\\n", + "\t 18 & accuracy & multiclass & 0.3891863 & 5 & 0.01990557 & Preprocessor1\\_Model18\\\\\n", "\t 19 & accuracy & multiclass & 0.3916246 & 5 & 0.02010759 & Preprocessor1\\_Model19\\\\\n", "\t 20 & accuracy & multiclass & 0.3968738 & 5 & 0.01765057 & Preprocessor1\\_Model20\\\\\n", "\t 21 & accuracy & multiclass & 0.3893414 & 5 & 0.01604878 & Preprocessor1\\_Model21\\\\\n", @@ -654,10 +775,24 @@ "\n", "| neighbors <dbl> | .metric <chr> | .estimator <chr> | mean <dbl> | n <dbl> | std_err <dbl> | .config <chr> |\n", "|---|---|---|---|---|---|---|\n", - "| 1 | accuracy | multiclass | 0.7741329 | 5 | 0.0236634 | Preprocessor1_Model01 |\n", - "| 2 | accuracy | multiclass | 0.7741329 | 5 | 0.0236634 | Preprocessor1_Model02 |\n", - "| 3 | accuracy | multiclass | 0.6029462 | 5 | 0.0151404 | Preprocessor1_Model03 |\n", - "| ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ |\n", + "| 1 | accuracy | multiclass | 0.7741329 | 5 | 0.02366340 | Preprocessor1_Model01 |\n", + "| 2 | accuracy | multiclass | 0.7741329 | 5 | 0.02366340 | Preprocessor1_Model02 |\n", + "| 3 | accuracy | multiclass | 0.6029462 | 5 | 0.01514040 | Preprocessor1_Model03 |\n", + "| 4 | accuracy | multiclass | 0.5385281 | 5 | 0.02673251 | Preprocessor1_Model04 |\n", + "| 5 | accuracy | multiclass | 0.4887989 | 5 | 0.02443692 | Preprocessor1_Model05 |\n", + "| 6 | accuracy | multiclass | 0.4738275 | 5 | 0.02162800 | Preprocessor1_Model06 |\n", + "| 7 | accuracy | multiclass | 0.4439486 | 5 | 0.02178144 | Preprocessor1_Model07 |\n", + "| 8 | accuracy | multiclass | 0.4293183 | 5 | 0.02294124 | Preprocessor1_Model08 |\n", + "| 9 | accuracy | multiclass | 0.4121262 | 5 | 0.03267083 | Preprocessor1_Model09 |\n", + "| 10 | accuracy | multiclass | 0.3998106 | 5 | 0.03164645 | Preprocessor1_Model10 |\n", + "| 11 | accuracy | multiclass | 0.3947775 | 5 | 0.02715977 | Preprocessor1_Model11 |\n", + "| 12 | accuracy | multiclass | 0.3775205 | 5 | 0.03101980 | Preprocessor1_Model12 |\n", + "| 13 | accuracy | multiclass | 0.3600483 | 5 | 0.02919724 | Preprocessor1_Model13 |\n", + "| 14 | accuracy | multiclass | 0.3673307 | 5 | 0.01475960 | Preprocessor1_Model14 |\n", + "| 15 | accuracy | multiclass | 0.3697072 | 5 | 0.01017029 | Preprocessor1_Model15 |\n", + "| 16 | accuracy | multiclass | 0.3794935 | 5 | 0.01357445 | Preprocessor1_Model16 |\n", + "| 17 | accuracy | multiclass | 0.3770868 | 5 | 0.01510417 | Preprocessor1_Model17 |\n", + "| 18 | accuracy | multiclass | 0.3891863 | 5 | 0.01990557 | Preprocessor1_Model18 |\n", "| 19 | accuracy | multiclass | 0.3916246 | 5 | 0.02010759 | Preprocessor1_Model19 |\n", "| 20 | accuracy | multiclass | 0.3968738 | 5 | 0.01765057 | Preprocessor1_Model20 |\n", "| 21 | accuracy | multiclass | 0.3893414 | 5 | 0.01604878 | Preprocessor1_Model21 |\n", @@ -665,10 +800,24 @@ ], "text/plain": [ " neighbors .metric .estimator mean n std_err .config \n", - "1 1 accuracy multiclass 0.7741329 5 0.0236634 Preprocessor1_Model01\n", - "2 2 accuracy multiclass 0.7741329 5 0.0236634 Preprocessor1_Model02\n", - "3 3 accuracy multiclass 0.6029462 5 0.0151404 Preprocessor1_Model03\n", - "⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ \n", + "1 1 accuracy multiclass 0.7741329 5 0.02366340 Preprocessor1_Model01\n", + "2 2 accuracy multiclass 0.7741329 5 0.02366340 Preprocessor1_Model02\n", + "3 3 accuracy multiclass 0.6029462 5 0.01514040 Preprocessor1_Model03\n", + "4 4 accuracy multiclass 0.5385281 5 0.02673251 Preprocessor1_Model04\n", + "5 5 accuracy multiclass 0.4887989 5 0.02443692 Preprocessor1_Model05\n", + "6 6 accuracy multiclass 0.4738275 5 0.02162800 Preprocessor1_Model06\n", + "7 7 accuracy multiclass 0.4439486 5 0.02178144 Preprocessor1_Model07\n", + "8 8 accuracy multiclass 0.4293183 5 0.02294124 Preprocessor1_Model08\n", + "9 9 accuracy multiclass 0.4121262 5 0.03267083 Preprocessor1_Model09\n", + "10 10 accuracy multiclass 0.3998106 5 0.03164645 Preprocessor1_Model10\n", + "11 11 accuracy multiclass 0.3947775 5 0.02715977 Preprocessor1_Model11\n", + "12 12 accuracy multiclass 0.3775205 5 0.03101980 Preprocessor1_Model12\n", + "13 13 accuracy multiclass 0.3600483 5 0.02919724 Preprocessor1_Model13\n", + "14 14 accuracy multiclass 0.3673307 5 0.01475960 Preprocessor1_Model14\n", + "15 15 accuracy multiclass 0.3697072 5 0.01017029 Preprocessor1_Model15\n", + "16 16 accuracy multiclass 0.3794935 5 0.01357445 Preprocessor1_Model16\n", + "17 17 accuracy multiclass 0.3770868 5 0.01510417 Preprocessor1_Model17\n", + "18 18 accuracy multiclass 0.3891863 5 0.01990557 Preprocessor1_Model18\n", "19 19 accuracy multiclass 0.3916246 5 0.02010759 Preprocessor1_Model19\n", "20 20 accuracy multiclass 0.3968738 5 0.01765057 Preprocessor1_Model20\n", "21 21 accuracy multiclass 0.3893414 5 0.01604878 Preprocessor1_Model21" @@ -764,7 +913,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 6, "metadata": { "tags": [ "remove-input" @@ -787,7 +936,61 @@ "\t2110381561\n", "\t1115381281\n", "\t0150381201\n", + "\t3105421281\n", + "\t4110451380\n", + "\t3100461331\n", + "\t1110471201\n", + "\t2120511043\n", + "\t1130511702\n", + "\t4 9552 822\n", + "\t412053 953\n", + "\t2130531200\n", + "\t2 80531410\n", + "\t1120541552\n", + "\t0180541501\n", + "\t1140551500\n", + "\t1115551551\n", + "\t212056 970\n", + "\t215556 992\n", + "\t1120561482\n", + "\t2140561211\n", + "\t1105571481\n", + "\t1140571003\n", + "\t011059 943\n", + "\t216060 993\n", + "\t2160601491\n", + "\t3130611153\n", + "\t213061 773\n", + "\t0150611172\n", + "\t2150631543\n", "\t⋮⋮⋮⋮⋮\n", + "\t011451 960\n", + "\t1127541541\n", + "\t2140631122\n", + "\t2160601571\n", + "\t417063 844\n", + "\t0126631200\n", + "\t0152601180\n", + "\t1120641061\n", + "\t1120561201\n", + "\t1124561610\n", + "\t1126531061\n", + "\t4170561234\n", + "\t2140691182\n", + "\t3136541403\n", + "\t3120721023\n", + "\t1142601102\n", + "\t2146611482\n", + "\t1158621121\n", + "\t1102481101\n", + "\t0150551500\n", + "\t4104761204\n", + "\t012062 860\n", + "\t2150581182\n", + "\t0160751120\n", + "\t2150641352\n", + "\t1180571201\n", + "\t3140671223\n", "\t2130641302\n", "\t3160581133\n", "\t2150581182\n", @@ -803,7 +1006,61 @@ "\t 2 & 110 & 38 & 156 & 1\\\\\n", "\t 1 & 115 & 38 & 128 & 1\\\\\n", "\t 0 & 150 & 38 & 120 & 1\\\\\n", + "\t 3 & 105 & 42 & 128 & 1\\\\\n", + "\t 4 & 110 & 45 & 138 & 0\\\\\n", + "\t 3 & 100 & 46 & 133 & 1\\\\\n", + "\t 1 & 110 & 47 & 120 & 1\\\\\n", + "\t 2 & 120 & 51 & 104 & 3\\\\\n", + "\t 1 & 130 & 51 & 170 & 2\\\\\n", + "\t 4 & 95 & 52 & 82 & 2\\\\\n", + "\t 4 & 120 & 53 & 95 & 3\\\\\n", + "\t 2 & 130 & 53 & 120 & 0\\\\\n", + "\t 2 & 80 & 53 & 141 & 0\\\\\n", + "\t 1 & 120 & 54 & 155 & 2\\\\\n", + "\t 0 & 180 & 54 & 150 & 1\\\\\n", + "\t 1 & 140 & 55 & 150 & 0\\\\\n", + "\t 1 & 115 & 55 & 155 & 1\\\\\n", + "\t 2 & 120 & 56 & 97 & 0\\\\\n", + "\t 2 & 155 & 56 & 99 & 2\\\\\n", + "\t 1 & 120 & 56 & 148 & 2\\\\\n", + "\t 2 & 140 & 56 & 121 & 1\\\\\n", + "\t 1 & 105 & 57 & 148 & 1\\\\\n", + "\t 1 & 140 & 57 & 100 & 3\\\\\n", + "\t 0 & 110 & 59 & 94 & 3\\\\\n", + "\t 2 & 160 & 60 & 99 & 3\\\\\n", + "\t 2 & 160 & 60 & 149 & 1\\\\\n", + "\t 3 & 130 & 61 & 115 & 3\\\\\n", + "\t 2 & 130 & 61 & 77 & 3\\\\\n", + "\t 0 & 150 & 61 & 117 & 2\\\\\n", + "\t 2 & 150 & 63 & 154 & 3\\\\\n", "\t ⋮ & ⋮ & ⋮ & ⋮ & ⋮\\\\\n", + "\t 0 & 114 & 51 & 96 & 0\\\\\n", + "\t 1 & 127 & 54 & 154 & 1\\\\\n", + "\t 2 & 140 & 63 & 112 & 2\\\\\n", + "\t 2 & 160 & 60 & 157 & 1\\\\\n", + "\t 4 & 170 & 63 & 84 & 4\\\\\n", + "\t 0 & 126 & 63 & 120 & 0\\\\\n", + "\t 0 & 152 & 60 & 118 & 0\\\\\n", + "\t 1 & 120 & 64 & 106 & 1\\\\\n", + "\t 1 & 120 & 56 & 120 & 1\\\\\n", + "\t 1 & 124 & 56 & 161 & 0\\\\\n", + "\t 1 & 126 & 53 & 106 & 1\\\\\n", + "\t 4 & 170 & 56 & 123 & 4\\\\\n", + "\t 2 & 140 & 69 & 118 & 2\\\\\n", + "\t 3 & 136 & 54 & 140 & 3\\\\\n", + "\t 3 & 120 & 72 & 102 & 3\\\\\n", + "\t 1 & 142 & 60 & 110 & 2\\\\\n", + "\t 2 & 146 & 61 & 148 & 2\\\\\n", + "\t 1 & 158 & 62 & 112 & 1\\\\\n", + "\t 1 & 102 & 48 & 110 & 1\\\\\n", + "\t 0 & 150 & 55 & 150 & 0\\\\\n", + "\t 4 & 104 & 76 & 120 & 4\\\\\n", + "\t 0 & 120 & 62 & 86 & 0\\\\\n", + "\t 2 & 150 & 58 & 118 & 2\\\\\n", + "\t 0 & 160 & 75 & 112 & 0\\\\\n", + "\t 2 & 150 & 64 & 135 & 2\\\\\n", + "\t 1 & 180 & 57 & 120 & 1\\\\\n", + "\t 3 & 140 & 67 & 122 & 3\\\\\n", "\t 2 & 130 & 64 & 130 & 2\\\\\n", "\t 3 & 160 & 58 & 113 & 3\\\\\n", "\t 2 & 150 & 58 & 118 & 2\\\\\n", @@ -818,7 +1075,61 @@ "| 2 | 110 | 38 | 156 | 1 |\n", "| 1 | 115 | 38 | 128 | 1 |\n", "| 0 | 150 | 38 | 120 | 1 |\n", + "| 3 | 105 | 42 | 128 | 1 |\n", + "| 4 | 110 | 45 | 138 | 0 |\n", + "| 3 | 100 | 46 | 133 | 1 |\n", + "| 1 | 110 | 47 | 120 | 1 |\n", + "| 2 | 120 | 51 | 104 | 3 |\n", + "| 1 | 130 | 51 | 170 | 2 |\n", + "| 4 | 95 | 52 | 82 | 2 |\n", + "| 4 | 120 | 53 | 95 | 3 |\n", + "| 2 | 130 | 53 | 120 | 0 |\n", + "| 2 | 80 | 53 | 141 | 0 |\n", + "| 1 | 120 | 54 | 155 | 2 |\n", + "| 0 | 180 | 54 | 150 | 1 |\n", + "| 1 | 140 | 55 | 150 | 0 |\n", + "| 1 | 115 | 55 | 155 | 1 |\n", + "| 2 | 120 | 56 | 97 | 0 |\n", + "| 2 | 155 | 56 | 99 | 2 |\n", + "| 1 | 120 | 56 | 148 | 2 |\n", + "| 2 | 140 | 56 | 121 | 1 |\n", + "| 1 | 105 | 57 | 148 | 1 |\n", + "| 1 | 140 | 57 | 100 | 3 |\n", + "| 0 | 110 | 59 | 94 | 3 |\n", + "| 2 | 160 | 60 | 99 | 3 |\n", + "| 2 | 160 | 60 | 149 | 1 |\n", + "| 3 | 130 | 61 | 115 | 3 |\n", + "| 2 | 130 | 61 | 77 | 3 |\n", + "| 0 | 150 | 61 | 117 | 2 |\n", + "| 2 | 150 | 63 | 154 | 3 |\n", "| ⋮ | ⋮ | ⋮ | ⋮ | ⋮ |\n", + "| 0 | 114 | 51 | 96 | 0 |\n", + "| 1 | 127 | 54 | 154 | 1 |\n", + "| 2 | 140 | 63 | 112 | 2 |\n", + "| 2 | 160 | 60 | 157 | 1 |\n", + "| 4 | 170 | 63 | 84 | 4 |\n", + "| 0 | 126 | 63 | 120 | 0 |\n", + "| 0 | 152 | 60 | 118 | 0 |\n", + "| 1 | 120 | 64 | 106 | 1 |\n", + "| 1 | 120 | 56 | 120 | 1 |\n", + "| 1 | 124 | 56 | 161 | 0 |\n", + "| 1 | 126 | 53 | 106 | 1 |\n", + "| 4 | 170 | 56 | 123 | 4 |\n", + "| 2 | 140 | 69 | 118 | 2 |\n", + "| 3 | 136 | 54 | 140 | 3 |\n", + "| 3 | 120 | 72 | 102 | 3 |\n", + "| 1 | 142 | 60 | 110 | 2 |\n", + "| 2 | 146 | 61 | 148 | 2 |\n", + "| 1 | 158 | 62 | 112 | 1 |\n", + "| 1 | 102 | 48 | 110 | 1 |\n", + "| 0 | 150 | 55 | 150 | 0 |\n", + "| 4 | 104 | 76 | 120 | 4 |\n", + "| 0 | 120 | 62 | 86 | 0 |\n", + "| 2 | 150 | 58 | 118 | 2 |\n", + "| 0 | 160 | 75 | 112 | 0 |\n", + "| 2 | 150 | 64 | 135 | 2 |\n", + "| 1 | 180 | 57 | 120 | 1 |\n", + "| 3 | 140 | 67 | 122 | 3 |\n", "| 2 | 130 | 64 | 130 | 2 |\n", "| 3 | 160 | 58 | 113 | 3 |\n", "| 2 | 150 | 58 | 118 | 2 |\n", @@ -829,7 +1140,61 @@ "1 2 110 38 156 1 \n", "2 1 115 38 128 1 \n", "3 0 150 38 120 1 \n", + "4 3 105 42 128 1 \n", + "5 4 110 45 138 0 \n", + "6 3 100 46 133 1 \n", + "7 1 110 47 120 1 \n", + "8 2 120 51 104 3 \n", + "9 1 130 51 170 2 \n", + "10 4 95 52 82 2 \n", + "11 4 120 53 95 3 \n", + "12 2 130 53 120 0 \n", + "13 2 80 53 141 0 \n", + "14 1 120 54 155 2 \n", + "15 0 180 54 150 1 \n", + "16 1 140 55 150 0 \n", + "17 1 115 55 155 1 \n", + "18 2 120 56 97 0 \n", + "19 2 155 56 99 2 \n", + "20 1 120 56 148 2 \n", + "21 2 140 56 121 1 \n", + "22 1 105 57 148 1 \n", + "23 1 140 57 100 3 \n", + "24 0 110 59 94 3 \n", + "25 2 160 60 99 3 \n", + "26 2 160 60 149 1 \n", + "27 3 130 61 115 3 \n", + "28 2 130 61 77 3 \n", + "29 0 150 61 117 2 \n", + "30 2 150 63 154 3 \n", "⋮ ⋮ ⋮ ⋮ ⋮ ⋮ \n", + "118 0 114 51 96 0 \n", + "119 1 127 54 154 1 \n", + "120 2 140 63 112 2 \n", + "121 2 160 60 157 1 \n", + "122 4 170 63 84 4 \n", + "123 0 126 63 120 0 \n", + "124 0 152 60 118 0 \n", + "125 1 120 64 106 1 \n", + "126 1 120 56 120 1 \n", + "127 1 124 56 161 0 \n", + "128 1 126 53 106 1 \n", + "129 4 170 56 123 4 \n", + "130 2 140 69 118 2 \n", + "131 3 136 54 140 3 \n", + "132 3 120 72 102 3 \n", + "133 1 142 60 110 2 \n", + "134 2 146 61 148 2 \n", + "135 1 158 62 112 1 \n", + "136 1 102 48 110 1 \n", + "137 0 150 55 150 0 \n", + "138 4 104 76 120 4 \n", + "139 0 120 62 86 0 \n", + "140 2 150 58 118 2 \n", + "141 0 160 75 112 0 \n", + "142 2 150 64 135 2 \n", + "143 1 180 57 120 1 \n", + "144 3 140 67 122 3 \n", "145 2 130 64 130 2 \n", "146 3 160 58 113 3 \n", "147 2 150 58 118 2 " diff --git a/notebooks/analysis.ipynb b/notebooks/analysis.ipynb index 563ee45..74bdb82 100644 --- a/notebooks/analysis.ipynb +++ b/notebooks/analysis.ipynb @@ -63,7 +63,20 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 27, + "metadata": { + "tags": [ + "remove-cell" + ] + }, + "outputs": [], + "source": [ + "library(tidyverse)" + ] + }, + { + "cell_type": "code", + "execution_count": 28, "metadata": { "tags": [ "remove-input" @@ -149,6 +162,7 @@ } ], "source": [ + "\n", "heart_data <- read_csv('../data/processed/heart_data.csv', show_col_types = FALSE)\n", "head(heart_data)" ]