Giter Club home page Giter Club logo

Comments (7)

havakv avatar havakv commented on August 23, 2024

Using the definition of the log partial hazard from here, for the DeepSurv, i.e., CoxPH model, you can simply call model.predict(x), as the log partial hazard is the output of the neural network.
The same is true for the CoxCC model.
For Cox-Time, this log partial hazard is a function of time, so I assume that is not what you're looking for?

from pycox.

havakv avatar havakv commented on August 23, 2024

We should probably add predict_partial_hazards and predict_partial_log_hazard this the the CoxPH and CoxCC models as is simplifies the usage. Also, they are a part of lifelines, so the user would expect them to be there.

from pycox.

gunesevitan avatar gunesevitan commented on August 23, 2024

Using the definition of the log partial hazard from here, for the DeepSurv, i.e., CoxPH model, you can simply call model.predict(x), as the log partial hazard is the output of the neural network.
The same is true for the CoxCC model.
For Cox-Time, this log partial hazard is a function of time, so I assume that is not what you're looking for?

I'm not well-versed in survival models but aren't partial hazard rates are dependent to time? We can predict with model.predict(X) but time vector is the first element of y tuple. I was trying to get some output from the model in order to calculate an oof concordance index, but this didn't seem right to me. How should I proceed?

from pycox.

havakv avatar havakv commented on August 23, 2024

@gunesevitan the idea of CoxPH (proportional hazards) is that the hazard rate is that the hazard of two individuals are represented by a scaling factor (which does not depend on time). So the hazard is defined as the (time-dependent) baseline hazard rate multiplied by this scaling factor (sometimes referred to as the partial hazard).
Therefore, the partial hazard rate of CoxPH should not be dependent on time.

I'm not sure I understand the second part of your question @gunesevitan. Could you try to explain again what you want to do?

from pycox.

kyuchoi avatar kyuchoi commented on August 23, 2024

@havakv So you mean that I can get hazard ratio from DeepHit using model.predict(x) as well?
Thank you so much in advance !

from pycox.

havakv avatar havakv commented on August 23, 2024

@kyuchoi No, the explanation above only works for proportional hazard models. Those models are constructed as the product of the baseline hazard and the partial hazard. For models that are not constructed this way (like deephit), I'm not sure the partial hazard is really obtainable. It would at least have to be dependent on time for some of them. I don't know it the partial hazard is that interesting to study or non-PH models at all, to be honest.

from pycox.

havakv avatar havakv commented on August 23, 2024

I'm sorry @kyuchoi, I thought you asked for the partial hazards. The answer is, however, very similar for the hazard ratios. You will not be able to get them directly for the DeepHit model. I'm not sure how to best study the hazard ratios for non-proportional hazards models, so I'm not really able to assist you here. However, if you find a way to get hazard ratios for non-proportional hazards model, I'd be happy to assist you with the implementation

from pycox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.