som-shahlab / survlearners

Metalearners for Survival Data
https://som-shahlab.github.io/survlearners
13 stars 1 forks source link

Extreme conditions that make current code fail #99

Open CrystalXuR opened 2 years ago

CrystalXuR commented 2 years ago

Examples are:

  1. No one in treatment or control arm
  2. No one is censored
  3. PS is not the same across subjects (from an observational study)
  4. Lengths of variables do not match, e.g., matrix dimensions
  5. Types of variables are incorrect, e.g., numeric vs. factors
  6. etc.
erikcs commented 2 years ago

Basic things like X,Y,Z etc are numeric and same lengths are easy to check.

For other things we need to think which invariants we wish to maintain given in input tuple (X,Y,W,D, times). For example if we require times > min(Y) and not all subjects censored then the following is always well defined https://github.com/som-shahlab/survmetabench/blob/master/r-package/survlearners/R/surv_fl_grf.R#L76

Some other things like X/T learners that split data into treated/control requires something more

erikcs commented 2 years ago

The requirement on n.min{W==0} and n.min{W==1} can maybe be made a function of n.folds and N to make things like https://github.com/som-shahlab/survmetabench/blob/master/r-package/survlearners/R/surv_xl_lasso.R#L39 always well defined

even if all D==0 for a given W things like https://github.com/som-shahlab/survmetabench/blob/master/r-package/survlearners/R/surv_xl_lasso.R#L42 are still well defined, the curve is just a constant, so ideally that doesn't need to be a requirement, though it's wierd input a user should have thought about