lgessl / patroklos

An R package pipelining binary classification of survival
https://lgessl.github.io/patroklos/
Other
0 stars 0 forks source link

Make `nested_pseudo_cv()` more flexible #13

Closed lgessl closed 2 months ago

lgessl commented 5 months ago

Right now, nested_pseudo_cv() wants

Some fitters might not offer integrated CV tuning. Right now, a user would have to write a wrapper around every single fitter lacking such an integrated CV tuning. It would be better if patroklos did this tuning itself, preferably inside nesed_pseudo_cv(). Function factories and the caret package should be interesting for this.

For tuning the hyperparameters of the second model, right now two nested R for-loops are responsible. One can speed this up by

  1. allowing a fitter with integrated CV, thus probably transferring the inner for-loop into faster, e.g. C, for-loop,
  2. using the apply family or the caret package to speed up the outer or inner for-loop if a fitter doesn't offer internal CV tuning.
lgessl commented 2 months ago

Thanks to clearly defined interfaces for fitters and the S3 classes of fit_objs, this feature is now there for the (renamed) long_nestor() as well as the new greedy_nestor().