Comments (5)
Hi @jaredleekatzman, let me know if you have any new thoughts on my second question regarding the range of the risk values and whether they should be between 0-1 (I see -5 to 5 from my normalized dataset). Much appreciated!
from deepsurv.
@dareneiri
When calculating the concordance index, the absolute event times are not necessary because the CI is calculated by comparing relative event times.
DeepSurv isn't predicting the event time for events, but the risk (effect of covariates on the hazard). We assume that an observation with a higher risk will cause an event to happen sooner. So, we take DeepSurv's predictions on a dataset as the reverse ranking (hence the negative sign) of event times.
This allows us to use the variable partial_hazards
in the place of predicted_event_times
in the lifelines package.
In our model, the network can predict negative risk because we take the exponent of the risk function. This transforms the values to be positive, which satisfies the constraint of the hazard function as positive.
from deepsurv.
@jaredleekatzman
Thank you for taking the time explain more in detail how DeepSurv works.
Could you provide more detail on what the expected range should be for these risk values? For me, this seems to be related to the size of my dataset and the set.seed() value, but I typically see a range of risk values from -5 to 5.
I obtain these values by running DeepSurv with the following changes in deep_surv.py near lines 163:
from theano import printing
risk = self.risk(deterministic)
risk_printed = theano.printing.Print('This is risk\n')(risk)
hazard_ratio = T.exp(risk_printed)
I collected these calculated risk values from Theano and created a historgram to see the spread.
I'm not looking at the hazard_ratio (relative risk), but the risk value itself. Shouldn't the risk values be between 0-1 (probability)?
Appreciate your time in providing a response!
Note that my concordance index is around 0.83 when these risk values result.
from deepsurv.
Hi @dareneiri ,
I saw you are very professional with deepsurv. Would you mind me ask you some questions about deepsurv? Now I can import deepsurv using pycharm but do I need to use docker in order to train my own model using my train data? If so, can you give some example code for begin? I am a beginner for this and many thanks for your reply in advance!
from deepsurv.
I have the same question regarding the range of the risk values
I am using below code after the model is trained
get_risk=model.predict_risk(train_data["x"])
print(get_risk)
for the metabric dataset, the range of this get_risk is (-0.016, 0.066)
for my own dataset (N quite large and rare event with event rate ~1% ), the range of this get_risk is
(-32.398220, 151.645113)
Much appreciated!!!
from deepsurv.
Related Issues (20)
- Deepsurv variable importance HOT 2
- Does deepsurv work with multi state ?
- Is it possibleto run the codes over google colab ?
- TypeError: Unknown parameter type: <class 'theano.tensor.var.TensorVariable'>
- partial log likelihood implementation
- Extract survival curves
- Is it a must to have same number of neurons in each hidden layer? HOT 1
- Multistate Competing or semi-competing risk
- AttributeError: 'str' object has no attribute 'save_weights'
- Error "NaNs detected in inputs, please correct or drop" HOT 1
- Reproducibility of model training HOT 4
- Inconsistency in result. HOT 1
- Interval censoring
- log.to_pandas() gives only NaNs
- batch size
- C-Index for DeepSurv in R
- data normalization
- output risk for computing timeROC
- struggling to install deepsurv HOT 2
- py.test not work?
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 deepsurv.