Open rhjohnstone opened 3 years ago
Hmm, this is a problem with the way that NGBSurvival
is implemented- specifically in the way that the abstractions for scores with and without survival data are designed. It's not an easy fix, unfortunately. I welcome suggestions, though. Related: https://github.com/stanfordmlgroup/ngboost/discussions/217
Minimal example:
(I'm not actually sure about the last line, since a standard sklearn estimator just takes (X, y) when fitting, but the current error occurs before that anyway.)
This raises the error
RuntimeError: Cannot clone object NGBSurvival(Dist=<class 'ngboost.distns.utils.SurvivalDistnClass<locals>.SurvivalDistn'>, n_estimators=50, random_state=RandomState(MT19937) at 0x7FA5683B1940), as the constructor either does not set or modifies parameter Dist
It does however work if I use
NGBRegressor
instead ofNGBSurvival
(and removeE
).Is there a way for me to fix this, or is this a problem with the
NGBSurvival
class? And if the latter, is it possible to fix?