Skip to content

Commit

Permalink
Update hospitalisation_prediction_uti.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
rriefu committed Mar 13, 2024
1 parent 3f15847 commit f7e5f66
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion analysis/hospitalisation_prediction_uti.ipynb
Expand Up @@ -2161,7 +2161,18 @@
" # calculate c-statistics\n",
" cox_output(cph_uti_no_abs_incdt, 'uti', 'no_abs_incdt', data_uti_no_abs_incdt_train, data_uti_no_abs_incdt_test, 'event_uti_admitted', 'duration_uti_admitted', '../output/hospitalisation_prediction_uti/')\n",
"except:\n",
" print(\"\\nerror_4: an error occurred in calculating c-stats of validation dataset and/or printing outputs.\")"
" print(\"\\nerror_4: an error occurred in calculating c-stats of validation dataset and/or printing outputs.\")\n",
"\n",
"\n",
"\n",
"# Access the Baseline Hazard\n",
"baseline_hazard = cph.baseline_hazard_\n",
"\n",
"# Calculate Baseline Hazard at Specific Time (day 30)\n",
"baseline_hazard_at_day_30 = baseline_hazard.loc[30]\n",
"\n",
"# Print the Baseline Hazard at day 30\n",
"print(\"Baseline Hazard at Day 30:\", baseline_hazard_at_day_30)\n"
]
},
{
Expand Down

0 comments on commit f7e5f66

Please sign in to comment.