Comments (7)
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.
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.
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.
@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.
@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.
@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.
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)
- L1 and L2 penalty coxph HOT 1
- AssertionError: assert durations.shape[0] == surv.shape[1] == surv_idx.shape[0] == events.shape[0]
- METABRIC Covariates Subset HOT 1
- AttributeError: 'Series' object has no attribute 'is_monotonic' HOT 18
- about hazard value! HOT 2
- Reproduction of the results in JMLR19 paper HOT 1
- Calculating Estimated Population Survival Curve HOT 4
- Some question about the result of deephit_competing_risks HOT 2
- AttributeError: 'DeepHitSingle' object has no attribute 'state_dict' HOT 1
- ValueError: cannot convert float NaN to integer HOT 1
- Softmax layer and residual connections in DeepHitSingle model HOT 1
- _initialization of _internal failed
- TypeError: forward() missing 1 required positional argument: 'events'
- ValueError: cannot convert float NaN to integer HOT 1
- A model to add
- Auto-encoder pycox implementation for 3D images instead of tabular data
- performance for ordinal categorical covariates
- what kind of model in pycox works for sequential patterns
- Newton-Raphson optimization
- [Installation] python setup.py egg_info did not run successfully HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pycox.