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

partial log likelihood implementation #71

Open
arjunascagnetto opened this issue Jun 28, 2021 · 0 comments
Open

partial log likelihood implementation #71

arjunascagnetto opened this issue Jun 28, 2021 · 0 comments

Comments

@arjunascagnetto
Copy link

Hi all,

thanks for your interesting and very usefull work.

we have read your interesting paper "DeepSurv: Personalized Treatment Recommender System Using A Cox Proportional Hazards Deep Neural Network." . We are very interested in implementing your deep learning approach to survival analysis. Therefore we looked into your code on github and we have a question about the partial log likelihood implementation. In particular we don't understand where you are selecting the appropriate risk set depending on the specific event times when you apply the function T.extr_ops.cumsum() . In other words with respect to the following formula

\frac{1}{N_D} \sum_{i \in D}[F(x_i,\theta) - log(\sum_{j \in R_i} e^F(x_j,\theta))] - \lambda P(\theta)

where do you take into account the R_i in the code (loglikelihood calculation) ?

    risk = self.risk(deterministic)
    hazard_ratio = T.exp(risk)
    log_risk = T.log(T.extra_ops.cumsum(hazard_ratio))  <------ HERE
    uncensored_likelihood = risk.T - log_risk
    censored_likelihood = uncensored_likelihood * E

thanks,
arjuna

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

1 participant