diff --git a/Final_v1.ipynb b/Final_v1.ipynb new file mode 100644 index 00000000..36af14c7 --- /dev/null +++ b/Final_v1.ipynb @@ -0,0 +1,1477 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "import matplotlib.pyplot as plt\n", + "import matplotlib.image as mpimg\n", + "import numpy as np\n", + "from sklearn.linear_model import LogisticRegression\n", + "import pandas as pd\n", + "import seaborn as sns\n", + "import os\n", + "import time\n", + "import sys" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + " | GCSTotal | \n", + "AgeinYears | \n", + "AgeInMonth | \n", + "ClavNeck_0 | \n", + "ClavNeck_1 | \n", + "ClavNeck_92 | \n", + "ClavTem_0 | \n", + "ClavTem_1 | \n", + "ClavTem_92 | \n", + "Hema_0 | \n", + "... | \n", + "Race_90 | \n", + "SFxPalp_0 | \n", + "SFxPalp_1 | \n", + "SFxPalp_2 | \n", + "SFxBasHem_0 | \n", + "SFxBasHem_1 | \n", + "SFxBasHem_92 | \n", + "AgeTwoPlus_1 | \n", + "AgeTwoPlus_2 | \n", + "outcome | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", + "15 | \n", + "16 | \n", + "197 | \n", + "1 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "1 | \n", + "0 | \n", + "0 | \n", + "... | \n", + "0 | \n", + "1 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "1 | \n", + "0 | \n", + "1 | \n", + "0.0 | \n", + "
1 | \n", + "15 | \n", + "5 | \n", + "64 | \n", + "0 | \n", + "0 | \n", + "1 | \n", + "0 | \n", + "0 | \n", + "1 | \n", + "1 | \n", + "... | \n", + "0 | \n", + "1 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "1 | \n", + "0 | \n", + "1 | \n", + "0.0 | \n", + "
2 | \n", + "15 | \n", + "1 | \n", + "13 | \n", + "1 | \n", + "0 | \n", + "0 | \n", + "1 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "... | \n", + "0 | \n", + "1 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "1 | \n", + "1 | \n", + "0 | \n", + "0.0 | \n", + "
3 | \n", + "15 | \n", + "3 | \n", + "46 | \n", + "1 | \n", + "0 | \n", + "0 | \n", + "1 | \n", + "0 | \n", + "0 | \n", + "1 | \n", + "... | \n", + "0 | \n", + "1 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "1 | \n", + "0 | \n", + "1 | \n", + "0.0 | \n", + "
4 | \n", + "15 | \n", + "4 | \n", + "51 | \n", + "1 | \n", + "0 | \n", + "0 | \n", + "1 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "... | \n", + "0 | \n", + "1 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "0 | \n", + "1 | \n", + "0 | \n", + "1 | \n", + "0.0 | \n", + "
5 rows × 204 columns
\n", + "\n", + " | Variable | \n", + "Frequency | \n", + "
---|---|---|
0 | \n", + "AgeInMonth | \n", + "0.3550 | \n", + "
1 | \n", + "AgeTwoPlus | \n", + "100.0000 | \n", + "
2 | \n", + "High_impact_InjSev | \n", + "99.2705 | \n", + "
3 | \n", + "Amnesia_verb | \n", + "44.0692 | \n", + "
4 | \n", + "LocLen | \n", + "9.4811 | \n", + "
5 | \n", + "Seiz | \n", + "1.1794 | \n", + "
6 | \n", + "SeizOccur | \n", + "1.0578 | \n", + "
7 | \n", + "SeizLen | \n", + "1.0018 | \n", + "
8 | \n", + "ActNorm | \n", + "78.3338 | \n", + "
9 | \n", + "HA_verb | \n", + "61.8665 | \n", + "
10 | \n", + "HASeverity | \n", + "27.7867 | \n", + "
11 | \n", + "HAStart | \n", + "27.1180 | \n", + "
12 | \n", + "Vomit | \n", + "13.1918 | \n", + "
13 | \n", + "VomitNbr | \n", + "12.5961 | \n", + "
14 | \n", + "VomitStart | \n", + "12.3334 | \n", + "
15 | \n", + "VomitLast | \n", + "11.0836 | \n", + "
16 | \n", + "GCSEye | \n", + "100.0000 | \n", + "
17 | \n", + "GCSVerbal | \n", + "100.0000 | \n", + "
18 | \n", + "GCSMotor | \n", + "100.0000 | \n", + "
19 | \n", + "GCSTotal | \n", + "96.7975 | \n", + "
20 | \n", + "GCSGroup | \n", + "100.0000 | \n", + "
21 | \n", + "AMS | \n", + "12.9535 | \n", + "
22 | \n", + "AMSAgitated | \n", + "1.7678 | \n", + "
23 | \n", + "AMSSleep | \n", + "6.6749 | \n", + "
24 | \n", + "AMSSlow | \n", + "3.2414 | \n", + "
25 | \n", + "AMSRepeat | \n", + "1.0383 | \n", + "
26 | \n", + "AMSOth | \n", + "1.7921 | \n", + "
27 | \n", + "Hema | \n", + "39.4830 | \n", + "
28 | \n", + "HemaLoc | \n", + "39.0186 | \n", + "
29 | \n", + "HemaSize | \n", + "37.8441 | \n", + "
30 | \n", + "Clav | \n", + "64.2155 | \n", + "
31 | \n", + "ClavFace | \n", + "30.1016 | \n", + "
32 | \n", + "ClavNeck | \n", + "1.3715 | \n", + "
33 | \n", + "ClavFro | \n", + "20.4893 | \n", + "
34 | \n", + "ClavOcc | \n", + "9.6562 | \n", + "
35 | \n", + "ClavTem | \n", + "3.4141 | \n", + "
36 | \n", + "NeuroD | \n", + "1.2936 | \n", + "
37 | \n", + "NeuroDMotor | \n", + "0.2796 | \n", + "
38 | \n", + "NeuroDSensory | \n", + "0.2553 | \n", + "
39 | \n", + "NeuroDCranial | \n", + "0.1897 | \n", + "
40 | \n", + "NeuroDReflex | \n", + "0.0292 | \n", + "
41 | \n", + "NeuroDOth | \n", + "0.7149 | \n", + "
42 | \n", + "Drugs | \n", + "0.8705 | \n", + "
43 | \n", + "LOCSeparate | \n", + "14.9159 | \n", + "
44 | \n", + "outcome | \n", + "0.8851 | \n", + "