Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surv => Regr pipeline using Buckley-James imputation #420

Open
bblodfon opened this issue Oct 25, 2024 · 0 comments
Open

Surv => Regr pipeline using Buckley-James imputation #420

bblodfon opened this issue Oct 25, 2024 · 0 comments

Comments

@bblodfon
Copy link
Collaborator

bblodfon commented Oct 25, 2024

This is the (old) code that did the task transformation (the bj$ynew is the imputed times, see R package bujar):

.bj = function(backend, status, time) {
      require_namespaces("bujar")

      x = data.frame(backend)[, colnames(backend) %nin% c(time, status), drop = FALSE]
      x = model.matrix(~., x)[, -1L]

      bj = invoke(bujar::bujar,
        y = backend[[time]],
        cens = backend[[status]],
        x = x,
        tuning = FALSE,
        vimpint = FALSE,
        .args = self$param_set$get_values(tags = "bj")
      )
      backend[[time]] = bj$ynew
      return(backend)
    },

Regression learner would predict the survival times, so we can map that back to the response survival prediction type and set crank = -response (which the PipeOpPredRegrSurv had done incorrectly)

@bblodfon bblodfon changed the title Implemente Surv => Regr pipeline using Buckley-James censoring imputation Surv => Regr pipeline using Buckley-James censoring imputation Oct 25, 2024
@bblodfon bblodfon changed the title Surv => Regr pipeline using Buckley-James censoring imputation Surv => Regr pipeline using Buckley-James imputation Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant