CamDavidsonPilon / lifelines

Survival analysis in Python
lifelines.readthedocs.org
MIT License
2.37k stars 560 forks source link

k_fold_crossvalidation and concordance_index don't take in account weights #723

Open KOLANICH opened 5 years ago

CamDavidsonPilon commented 5 years ago

Hm, true. I'll fix this for next release.

CamDavidsonPilon commented 5 years ago

Well, this can be done using the fitter_kwargs argument, but maybe it's not obvious: k_fold_cross_validation(..., fitter_kwargs={'weights_col': 'w'}). I'll include an example in the docstring

KOLANICH commented 5 years ago

For a fitter yes, but how about concordance? I guess weights of each instance influence concordance (and google returns some papers on it), but is it taken into account? I feel like no, because concordance_index doesn't accept an arg for weights.