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

Problems in DeepCoxMixture with possible solutions #106

Open
braisCB opened this issue Mar 23, 2023 · 1 comment
Open

Problems in DeepCoxMixture with possible solutions #106

braisCB opened this issue Mar 23, 2023 · 1 comment

Comments

@braisCB
Copy link

braisCB commented Mar 23, 2023

When I used DeepCoxMixture in my synthetic data I found some problems:

  1. Patience is too low. It cannot be controlled by the fit method, so I had to manually changed it to 50. I also change the code a little bit in that part, so the patience only take into account the best result:
var add2 = function(number) {
     if valcn > valc:
     patience_ += 1
   else:
     patience_ = 0
     valc = valcn
}
  1. In some execution I get a SIGSEGV error. After some digging I found the error is caused by the UnivariateSpline module. I found the use of this spline causes some undesirable effects, like placing negative values. I have changed this module to the more stable Pchipinterpolator, which is able to preserve the monotony of the curve. I have obtained mode stable results with this approach. I have only changed the function:
def fit_spline(t, surv, s=1e-4):
  # return UnivariateSpline(t, surv, s=s, ext=3, k=1)
  return PchipInterpolator(t, surv)
  1. I also suggest to change the repair_probs function to prevent some infinite values that can appear:
def repair_probs(probs):
  probs[torch.isnan(probs)] = -10
  probs[probs>10] = 10
  probs[probs<-10] = -10
  return probs
@chiragnagpal
Copy link
Collaborator

Hello @braisCB

I plan to re-release DCM with a much more stable implementation that should also potentially alleviate some of the issues you mention:
Some of the changes I am planning to include are:

  • Instead of sampling posteriors when fitting the Breslow curve, one case easily fit a weighted Breslow curve.
  • I agree the spline fitting can be a bit problematic and perhaps replacing with the module you recommend is a better approach.

I am a bit occupied with my thesis completion right now, but I promise that I will get back to you in a couple of months time with updates.

Feel free to reach out to me at [email protected] in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants