Note
This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.
biolearn.mortality.calculate_c_index#
- biolearn.mortality.calculate_c_index(data, predictor_results)#
Calculates the C-index for each predictor in the predictor_results DataFrame without adjusting for age.
- Parameters:
data (Dataset) – A Dataset object containing metadata with columns: ‘dead’ - boolean indicating if the subject is dead ‘years_until_death’ - time until death or censoring
predictor_results (pd.DataFrame) – DataFrame containing predictor results. Columns are the names of the predictors, and rows are IDs from data.
- Returns:
A DataFrame containing C-index values for each predictor.
- Return type:
pd.DataFrame