sebp / scikit-survival

Survival analysis built on top of scikit-learn
GNU General Public License v3.0
1.14k stars 216 forks source link

Adding penalty_factor to CoxPHSurvivalAnalysis #102

Closed hermidalc closed 4 years ago

hermidalc commented 4 years ago

It would be very useful to also support a penalty_factor in CoxPHSurvivalAnalysis in order to always include unpenalized covariates in the model. This is important when you need to adjust for e.g. known prognostic clinical or molecular covariates which shouldn't be penalized. This is something supported for Cox ridge regression in for example the penalized R package.

hermidalc commented 4 years ago

For now I've worked out and tested a workaround using CoxnetSurvivalAnalysis settings to become L2 penalized Ridge regression and produce identical results to CoxPHSurvivalAnalysis using information https://github.com/sebp/scikit-survival/issues/42. This allows me to use and set penalty_factor to 0 for these covariates.

hermidalc commented 4 years ago

Dear @sebp - I know I'm not supposed to ask survival analysis questions here, and I did post a question on Cross Validated, but I would appreciate very much you feedback because after doing a literature search I cannot find any answers.

When running non-Cox, non-regression scikit-survival ML survival analysis methods, for example FastSurvivalSVM, GradientBoostingSurvivalAnalysis, or RandomSurvivalForest, how do you account/adjust for known prognostic clinical or molecular covariates?