-
Notifications
You must be signed in to change notification settings - Fork 174
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
How to Use DeepSurv Exactly? #34
Comments
I just uploaded a simple notebook showing how to take a CSV file and create a dataset to use with DeepSurv. Take a look at that and see if you understand it more. And then let me know if you have any other questions |
Thank you so much for your comment. I can run mots of the codes without an issues. At the end, I cannot run the last two part of the codes as below:KeyError Traceback (most recent call last) KeyError: 'c-index' KeyError Traceback (most recent call last) /Users/ksasaki1/AppData/Local/Programs/Python/Python36/Lib/site-packages/DeepSurv-master/deepsurv\viz.py in plot_log(log) KeyError: 'loss' P.S. |
I'm getting the same error for last two lines of code, with loss as a KeyError. Adding to messenger's point above, some code on how to obtain the personalized treatment recommendation would be appreciated. Sorry, I'm actually giving a literature review with your paper as part of a PoC for a project. |
I am still quite new to Python, and am trying to apply my data to deepsurv. Would you mind sharing the exact code you wrote between the two paragraphs below? I appreciate your help.
Training DeepSurv can be done in a few lines. First, all you need to do is prepare the datasets to have the following keys:
{
'x': (n,d) observations (dtype = float32),
't': (n) event times (dtype = float32),
'e': (n) event indicators (dtype = int32)
}
Then prepare a dictionary of hyper-parameters. And it takes only two lines to train a network:
network = deepsurv.DeepSurv(**hyperparams)
log = network.train(train_data, valid_data, n_epochs=500)
The text was updated successfully, but these errors were encountered: