biolearn.mortality: Mortality Predictor Evaluation#

This module provides a set of functions for evaluating predictors of mortality

Functions:

run_predictions(data, predictors_dict)

Runs predictions using a collection of models from the model gallery specified in predictors_dict and returns a DataFrame with the results.

calculate_c_index(data, predictor_results)

Calculates the C-index for each predictor in the predictor_results DataFrame without adjusting for age.

calculate_mortality_hazard_ratios(data, ...)

Calculates mortality hazard ratios for predictor results using a Cox Proportional Hazards model.

calculate_age_adjusted_c_index(data, ...)

Calculates the C-index for each predictor in the predictor_results DataFrame, adjusted for age.

calculate_log_rank_test(data, predictor_results)

Calculates the log-rank test for each predictor in the predictor_results DataFrame, adjusted for age.

plot_hazard_ratios(hazard_ratio_data)

Plots hazard ratios from the provided data in a forest plot.