mertkarabacak
commited on
Commit
•
6d9b18e
1
Parent(s):
13854f8
Upload app.py
Browse files
app.py
CHANGED
@@ -166,7 +166,7 @@ def y1_interpret_xgb(*args):
|
|
166 |
scores_desc = list(zip(shap_values[0], x1.columns))
|
167 |
scores_desc = sorted(scores_desc)
|
168 |
fig_m = plt.figure(facecolor='white')
|
169 |
-
fig_m.set_size_inches(14,
|
170 |
plt.barh([s[1] for s in scores_desc], [s[0] for s in scores_desc])
|
171 |
plt.title("Feature Shap Values", fontsize = 24, pad = 20, fontweight = 'bold')
|
172 |
plt.yticks(fontsize=12)
|
@@ -181,7 +181,7 @@ def y1_interpret_lgb(*args):
|
|
181 |
scores_desc = list(zip(shap_values[0][0], x1.columns))
|
182 |
scores_desc = sorted(scores_desc)
|
183 |
fig_m = plt.figure(facecolor='white')
|
184 |
-
fig_m.set_size_inches(14,
|
185 |
plt.barh([s[1] for s in scores_desc], [s[0] for s in scores_desc])
|
186 |
plt.title("Feature Shap Values", fontsize = 24, pad = 20, fontweight = 'bold')
|
187 |
plt.yticks(fontsize=12)
|
@@ -196,7 +196,7 @@ def y1_interpret_cb(*args):
|
|
196 |
scores_desc = list(zip(shap_values[0], x1.columns))
|
197 |
scores_desc = sorted(scores_desc)
|
198 |
fig_m = plt.figure(facecolor='white')
|
199 |
-
fig_m.set_size_inches(14,
|
200 |
plt.barh([s[1] for s in scores_desc], [s[0] for s in scores_desc])
|
201 |
plt.title("Feature Shap Values", fontsize = 24, pad = 20, fontweight = 'bold')
|
202 |
plt.yticks(fontsize=12)
|
@@ -211,7 +211,7 @@ def y1_interpret_rf(*args):
|
|
211 |
scores_desc = list(zip(shap_values[0][0], x1_rf.columns))
|
212 |
scores_desc = sorted(scores_desc)
|
213 |
fig_m = plt.figure(facecolor='white')
|
214 |
-
fig_m.set_size_inches(14,
|
215 |
plt.barh([s[1] for s in scores_desc], [s[0] for s in scores_desc])
|
216 |
plt.title("Feature Shap Values", fontsize = 24, pad = 20, fontweight = 'bold')
|
217 |
plt.yticks(fontsize=12)
|
@@ -269,7 +269,7 @@ with gr.Blocks(title = "NTDB-Epidural") as demo:
|
|
269 |
|
270 |
Systolic_Blood_Pressure = gr.Slider(label = "Systolic Blood Pressure", minimum = 50, maximum = 250, step = 1, value = 135)
|
271 |
|
272 |
-
Pulse_Rate = gr.Slider(label = "Pulse Rate", minimum=20, maximum=250, step=1, value =
|
273 |
|
274 |
Supplemental_Oxygen = gr.Radio(label = "Supplemental Oxygen", choices = unique_SUPPLEMENTALOXYGEN, type = 'index', value = 'No supplemental oxygen')
|
275 |
|
@@ -425,26 +425,14 @@ with gr.Blocks(title = "NTDB-Epidural") as demo:
|
|
425 |
|
426 |
with gr.Box():
|
427 |
with gr.Row():
|
428 |
-
|
429 |
-
gr.Markdown(
|
430 |
-
"""
|
431 |
-
|
432 |
-
"""
|
433 |
-
)
|
434 |
-
|
435 |
gr.Markdown(
|
436 |
"""
|
437 |
-
|
438 |
## Mortality
|
439 |
-
|
440 |
-
"""
|
441 |
-
)
|
442 |
-
|
443 |
-
gr.Markdown(
|
444 |
"""
|
445 |
|
446 |
-
"""
|
447 |
-
)
|
448 |
|
449 |
with gr.Row():
|
450 |
y1_predict_btn_xgb = gr.Button(value="Predict (XGBoost)")
|
|
|
166 |
scores_desc = list(zip(shap_values[0], x1.columns))
|
167 |
scores_desc = sorted(scores_desc)
|
168 |
fig_m = plt.figure(facecolor='white')
|
169 |
+
fig_m.set_size_inches(14, 24)
|
170 |
plt.barh([s[1] for s in scores_desc], [s[0] for s in scores_desc])
|
171 |
plt.title("Feature Shap Values", fontsize = 24, pad = 20, fontweight = 'bold')
|
172 |
plt.yticks(fontsize=12)
|
|
|
181 |
scores_desc = list(zip(shap_values[0][0], x1.columns))
|
182 |
scores_desc = sorted(scores_desc)
|
183 |
fig_m = plt.figure(facecolor='white')
|
184 |
+
fig_m.set_size_inches(14, 24)
|
185 |
plt.barh([s[1] for s in scores_desc], [s[0] for s in scores_desc])
|
186 |
plt.title("Feature Shap Values", fontsize = 24, pad = 20, fontweight = 'bold')
|
187 |
plt.yticks(fontsize=12)
|
|
|
196 |
scores_desc = list(zip(shap_values[0], x1.columns))
|
197 |
scores_desc = sorted(scores_desc)
|
198 |
fig_m = plt.figure(facecolor='white')
|
199 |
+
fig_m.set_size_inches(14, 24)
|
200 |
plt.barh([s[1] for s in scores_desc], [s[0] for s in scores_desc])
|
201 |
plt.title("Feature Shap Values", fontsize = 24, pad = 20, fontweight = 'bold')
|
202 |
plt.yticks(fontsize=12)
|
|
|
211 |
scores_desc = list(zip(shap_values[0][0], x1_rf.columns))
|
212 |
scores_desc = sorted(scores_desc)
|
213 |
fig_m = plt.figure(facecolor='white')
|
214 |
+
fig_m.set_size_inches(14, 24)
|
215 |
plt.barh([s[1] for s in scores_desc], [s[0] for s in scores_desc])
|
216 |
plt.title("Feature Shap Values", fontsize = 24, pad = 20, fontweight = 'bold')
|
217 |
plt.yticks(fontsize=12)
|
|
|
269 |
|
270 |
Systolic_Blood_Pressure = gr.Slider(label = "Systolic Blood Pressure", minimum = 50, maximum = 250, step = 1, value = 135)
|
271 |
|
272 |
+
Pulse_Rate = gr.Slider(label = "Pulse Rate", minimum=20, maximum=250, step=1, value = 75)
|
273 |
|
274 |
Supplemental_Oxygen = gr.Radio(label = "Supplemental Oxygen", choices = unique_SUPPLEMENTALOXYGEN, type = 'index', value = 'No supplemental oxygen')
|
275 |
|
|
|
425 |
|
426 |
with gr.Box():
|
427 |
with gr.Row():
|
428 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
gr.Markdown(
|
430 |
"""
|
431 |
+
<br/>
|
432 |
## Mortality
|
433 |
+
<br/>
|
|
|
|
|
|
|
|
|
434 |
"""
|
435 |
|
|
|
|
|
436 |
|
437 |
with gr.Row():
|
438 |
y1_predict_btn_xgb = gr.Button(value="Predict (XGBoost)")
|