Alarm_EDA.ipynb 115 KB
Newer Older
thecml's avatar
thecml committed
1001
       "    \n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1002
       "        <tr style=\"background-color: hsl(120, 100.00%, 84.33%); border: none;\">\n",
thecml's avatar
thecml committed
1003
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1004
       "                0.0768\n",
thecml's avatar
thecml committed
1005
1006
1007
1008
1009
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
thecml's avatar
thecml committed
1010
       "                LoanPeriod\n",
thecml's avatar
thecml committed
1011
1012
1013
       "            </td>\n",
       "        </tr>\n",
       "    \n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1014
       "        <tr style=\"background-color: hsl(120, 100.00%, 84.43%); border: none;\">\n",
thecml's avatar
thecml committed
1015
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1016
       "                0.0761\n",
thecml's avatar
thecml committed
1017
1018
1019
1020
1021
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
thecml's avatar
thecml committed
1022
       "                1Ats\n",
thecml's avatar
thecml committed
1023
1024
1025
       "            </td>\n",
       "        </tr>\n",
       "    \n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1026
       "        <tr style=\"background-color: hsl(120, 100.00%, 89.01%); border: none;\">\n",
thecml's avatar
thecml committed
1027
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1028
       "                0.0463\n",
thecml's avatar
thecml committed
1029
1030
1031
1032
1033
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
thecml's avatar
thecml committed
1034
       "                3Ats\n",
thecml's avatar
thecml committed
1035
1036
1037
       "            </td>\n",
       "        </tr>\n",
       "    \n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1038
       "        <tr style=\"background-color: hsl(120, 100.00%, 89.66%); border: none;\">\n",
thecml's avatar
thecml committed
1039
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1040
       "                0.0424\n",
thecml's avatar
thecml committed
1041
1042
1043
1044
1045
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
thecml's avatar
thecml committed
1046
       "                2Ats\n",
thecml's avatar
thecml committed
1047
1048
1049
       "            </td>\n",
       "        </tr>\n",
       "    \n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1050
       "        <tr style=\"background-color: hsl(120, 100.00%, 90.00%); border: none;\">\n",
thecml's avatar
thecml committed
1051
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1052
       "                0.0404\n",
thecml's avatar
thecml committed
1053
1054
1055
1056
1057
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
thecml's avatar
thecml committed
1058
       "                NumberAts\n",
thecml's avatar
thecml committed
1059
1060
1061
       "            </td>\n",
       "        </tr>\n",
       "    \n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1062
       "        <tr style=\"background-color: hsl(120, 100.00%, 93.12%); border: none;\">\n",
thecml's avatar
thecml committed
1063
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1064
       "                0.0237\n",
thecml's avatar
thecml committed
1065
1066
1067
1068
1069
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
thecml's avatar
thecml committed
1070
       "                4Ats\n",
thecml's avatar
thecml committed
1071
1072
1073
       "            </td>\n",
       "        </tr>\n",
       "    \n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1074
       "        <tr style=\"background-color: hsl(120, 100.00%, 93.91%); border: none;\">\n",
thecml's avatar
thecml committed
1075
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1076
       "                0.0199\n",
thecml's avatar
thecml committed
1077
1078
1079
1080
1081
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
thecml's avatar
thecml committed
1082
       "                Gender\n",
thecml's avatar
thecml committed
1083
1084
1085
       "            </td>\n",
       "        </tr>\n",
       "    \n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1086
       "        <tr style=\"background-color: hsl(120, 100.00%, 94.76%); border: none;\">\n",
thecml's avatar
thecml committed
1087
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1088
       "                0.0161\n",
thecml's avatar
thecml committed
1089
1090
1091
1092
1093
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
thecml's avatar
thecml committed
1094
       "                5Ats\n",
thecml's avatar
thecml committed
1095
1096
1097
       "            </td>\n",
       "        </tr>\n",
       "    \n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1098
       "        <tr style=\"background-color: hsl(120, 100.00%, 95.48%); border: none;\">\n",
thecml's avatar
thecml committed
1099
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1100
       "                0.0130\n",
thecml's avatar
thecml committed
1101
1102
1103
1104
1105
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
thecml's avatar
thecml committed
1106
       "                6Ats\n",
thecml's avatar
thecml committed
1107
1108
1109
       "            </td>\n",
       "        </tr>\n",
       "    \n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1110
       "        <tr style=\"background-color: hsl(120, 100.00%, 97.41%); border: none;\">\n",
thecml's avatar
thecml committed
1111
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1112
       "                0.0059\n",
thecml's avatar
thecml committed
1113
1114
1115
1116
1117
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
thecml's avatar
thecml committed
1118
       "                7Ats\n",
thecml's avatar
thecml committed
1119
1120
1121
       "            </td>\n",
       "        </tr>\n",
       "    \n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1122
       "        <tr style=\"background-color: hsl(120, 100.00%, 97.45%); border: none;\">\n",
thecml's avatar
thecml committed
1123
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1124
       "                0.0058\n",
thecml's avatar
thecml committed
1125
1126
1127
1128
1129
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
thecml's avatar
thecml committed
1130
       "                8Ats\n",
thecml's avatar
thecml committed
1131
1132
1133
       "            </td>\n",
       "        </tr>\n",
       "    \n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1134
       "        <tr style=\"background-color: hsl(120, 100.00%, 98.24%); border: none;\">\n",
thecml's avatar
thecml committed
1135
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1136
       "                0.0034\n",
thecml's avatar
thecml committed
1137
1138
1139
1140
1141
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
thecml's avatar
thecml committed
1142
       "                9Ats\n",
thecml's avatar
thecml committed
1143
1144
1145
       "            </td>\n",
       "        </tr>\n",
       "    \n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1146
       "        <tr style=\"background-color: hsl(120, 100.00%, 99.14%); border: none;\">\n",
thecml's avatar
thecml committed
1147
       "            <td style=\"padding: 0 1em 0 0.5em; text-align: right; border: none;\">\n",
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1148
       "                0.0012\n",
thecml's avatar
thecml committed
1149
1150
1151
1152
1153
       "                \n",
       "                    &plusmn; 0.0000\n",
       "                \n",
       "            </td>\n",
       "            <td style=\"padding: 0 0.5em 0 0.5em; text-align: left; border: none;\">\n",
thecml's avatar
thecml committed
1154
       "                10Ats\n",
thecml's avatar
thecml committed
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
       "            </td>\n",
       "        </tr>\n",
       "    \n",
       "    \n",
       "    </tbody>\n",
       "</table>\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "    \n",
       "\n",
       "\n",
       "\n"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
Christian Marius Lillelund's avatar
Christian Marius Lillelund committed
1185
     "execution_count": 17,
thecml's avatar
thecml committed
1186
1187
1188
1189
1190
1191
1192
1193
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import eli5\n",
    "from eli5.sklearn import PermutationImportance\n",
    "\n",
thecml's avatar
thecml committed
1194
    "perm = PermutationImportance(model, n_iter=1, random_state=0)\n",
thecml's avatar
thecml committed
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
    "perm.fit(X_test, y_test)\n",
    "eli5.show_weights(perm, feature_names=X_train.columns.tolist())"
   ]
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "59ff6fbb0321898508cf6243593820bf2585fcfb6693fd00e85ec94ed8847fd0"
  },
  "kernelspec": {
   "display_name": "Python 3.8.8 64-bit ('py38-air': conda)",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
thecml's avatar
thecml committed
1218
   "version": "3.8.8"
thecml's avatar
thecml committed
1219
1220
1221
1222
1223
1224
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}