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

Intuitions for padding model output columns? #152

Open
siyueyang opened this issue Nov 23, 2022 · 0 comments
Open

Intuitions for padding model output columns? #152

siyueyang opened this issue Nov 23, 2022 · 0 comments

Comments

@siyueyang
Copy link

siyueyang commented Nov 23, 2022

Thanks for creating this wonderful package!

I have a few questions regrading the functions for deephit model:
https://github.com/havakv/pycox/blob/master/pycox/models/deephit.py

1. Regarding predit_surv in line 155
surv = 1. - cif.sum(0)
why it needs to take the sum for cif? The cumulative sum has already been calculated in cif, and in my view, it should be:
surv = 1 - cif

2. Regarding predict_pmf in line 202
pmf = pad_col(preds.view(preds.size(0), -1)).softmax(1)[:, :-1]
what are the intuitions for padding another column for the model output before softmax?

In the original paper "Continuous and Discrete-Time Survival Prediction with Neural Networks", page 7, it says
Alternatively, one could let φm+1(x) vary freely, something that is quite common in machine learning, but we chose to follow the typical conventions in statistics.

I am confused about this trick. If I took the φm+1(x) very large, then the estimated probability (after applying softmax) for each time interval would be very small, will this affect my predictions?

Any comments would be appreciated! Thanks in advance!

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