You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am also a researcher on GIScience and human mobility, and I have read your paper about "DeepGravity" published on Nature Communications. It's an excellent and innovative work. And I am trying to reproduce it for other similar tasks. But I have some questions about your source code and am grateful for your help.
In your paper, there is a model architecture in Figure 1, you design a feed-forward neural network with 15 hidden layers. And input all the three-tuple (xi, xj, rij) into it (which is the same feed-forward network) for training, right? And the output of each three-tuple should be a score sij. And then, you apply a softmax layer to normalize it as probability pij, which indicates the probability of interaction between location i and j. So, my question is how this softmax layer is implemented. Because for each OD-specific three-tuple, the output is a value, not a vector, so how to use softmax for a single value? And besides, because the softmax layer is to get the probability of going to each destination with a fixed origin, right? It is necessary to ensure that the origins of the same batch of OD samples that are input into the softmax layer are the same, so that it makes sense, and I do not find the corresponding implementation part in the source code.
Thank you first and hope to hear from you as soon as possible.
The text was updated successfully, but these errors were encountered:
Dear sunshineYin, I am sorry for the late reply.
Actually, the probabilities of the model are computed within the GLM_multinomialRegression class we implemented in the file od_models.py. In particular, there is the function predict_proba that uses a softmax to actually compute the probability of a vector x passed to the model. Note that everything is invocated from the get_cpc function (same file) when we call average_OD_model
Please, let me know if it is more clear and it there is something else we can do
Hello, I am also a researcher on GIScience and human mobility, and I have read your paper about "DeepGravity" published on Nature Communications. It's an excellent and innovative work. And I am trying to reproduce it for other similar tasks. But I have some questions about your source code and am grateful for your help.
In your paper, there is a model architecture in Figure 1, you design a feed-forward neural network with 15 hidden layers. And input all the three-tuple (xi, xj, rij) into it (which is the same feed-forward network) for training, right? And the output of each three-tuple should be a score sij. And then, you apply a softmax layer to normalize it as probability pij, which indicates the probability of interaction between location i and j. So, my question is how this softmax layer is implemented. Because for each OD-specific three-tuple, the output is a value, not a vector, so how to use softmax for a single value? And besides, because the softmax layer is to get the probability of going to each destination with a fixed origin, right? It is necessary to ensure that the origins of the same batch of OD samples that are input into the softmax layer are the same, so that it makes sense, and I do not find the corresponding implementation part in the source code.
Thank you first and hope to hear from you as soon as possible.
The text was updated successfully, but these errors were encountered: