sebp / scikit-survival

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

Add eval_set to fit() to fit() method #466

Closed pivettamarcos closed 3 months ago

pivettamarcos commented 4 months ago

It would be nice if the fit() method for the models had eval_set parameter. This way I could define the validation set I want to use for early stopping, and not use the holdout set currently defined by scikit-survival.

sebp commented 4 months ago

Welcome and thanks for your interest in scikit-survival.

Can you please provide a more detailed description of what you are looking for? Which classifier do you want to apply early stopping to? What do you exactly mean by "holdout set currently defined" by scikit-survival"?

pivettamarcos commented 4 months ago

I'm currently using GradientBoostingSurvivalAnalysis. Would it be possible to implement a parameter like "eval_set" passed to the fit() function just like it's possible with the XGBoost package?

I'm aware of the validation_fraction parameter, but I have no control over what portion of data will be used for validation.

sebp commented 4 months ago

If you want full control, use the monitor argument of fit().