guaguabujianle/SA-DDI

I have some questions about the data processing part! ! !

Opened this issue · 10 comments

It is mentioned in the paper that chemical bonds of drugs are used. How to deal with single elements, that is, drugs without chemical bonds, when constructing 'line_graph_edge_index'?

Have you made any alterations to the code? It appears that the source code is able to handle compounds that consist of a single atom only. In such scenarios, 'line_graph_edge_index' would be an empty LongTensor. The most likely cause of the error could be incorrect utilization of the 'scatter' function.

@guaguabujianle I haven't modified the source code, so I'm confused as to what to do with drugs that don't have chemical bonds! Can you help me solve this problem, thank you very much! !

The error message is indeed that there is an index error when performing "'scatter"!

Could you clarify whether the error arises during the training or testing phase? Also, what is the current value of batch_size? Please keep in mind that batch_size must not be configured to 1.

@guaguabujianle ,During the training phase, batchsize is set to 64. In addition, I think during the testing phase, if the test set contains a single element, there will also be this error.

I apologize for not being able to offer more useful suggestions. Perhaps the most effective solution would be to simply remove compounds that contain only a single atom.

It doesn't matter! Thank you for your patient reply

@guaguabujianle Sorry to bother you again! I want to know how to operate the visualization part of the paper, that is, to visualize the Pearson correlation coefficient between the atoms of each molecule according to formula (7). Can you tell me the specific implementation process of this step? I am a novice! !

You can contact me via 418951722@qq.com. I will send you some relevant codes.

Thank you very much for your reply! !