mims-harvard / decagon Goto Github PK
View Code? Open in Web Editor NEWGraph convolutional neural network for multirelational link prediction
Home Page: http://snap.stanford.edu/decagon
License: MIT License
Graph convolutional neural network for multirelational link prediction
Home Page: http://snap.stanford.edu/decagon
License: MIT License
ModuleNotFoundError Traceback (most recent call last)
in
12 from sklearn import metrics
13
---> 14 from decagon.optimizer import DecagonOptimizer
15 from decagon.model import DecagonModel
16 from decagon.minibatch import EdgeMinibatchIterator
ModuleNotFoundError: No module named 'decagon'
AttributeError: module 'tensorflow' has no attribute 'app'
(base) C:\Users\chert\decagon>python main.py
Traceback (most recent call last):
File "main.py", line 14, in
from decagon.deep.optimizer import DecagonOptimizer
File "C:\Users\chert\decagon\decagon\deep\optimizer.py", line 4, in
flags = tf.app.flags
AttributeError: module 'tensorflow' has no attribute 'app'
(base) C:\Users\chert\decagon>
how to solve this error ??
Could you tell the meaning of variable n_drugdrug_rel_types in main.py?
The design of your adjacency matrix adj_mats_orig
and the way you split the train/test set will cause a huge data leakage problem in your training, because your validation and test set is created independently for gene_adj
and gene_adj.transpose(copy=True)
, and therefore the edges from the validation / test set in gene_adj
is actually included in the training set of gene_adj.transpose(copy=True)
.
Same problem goes for the train / validate set between gene_drug_adj
and drug_gene_adj
. The validation edges from gene_drug_adj
are actually used for training in drug_gene_adj
, and vise versa.
Could you please clarify?
Thanks!
Originally posted by @hurleyLi in #7 (comment)
Hello! Could you tell me the meaning of every variable in main.py?
Thanks
Any chance you will upload the trained, final model? Thanks!
How to solve this error ?
Using cached https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl
Collecting futures==3.2.0 (from -r requirements.txt (line 8))
ERROR: Could not find a version that satisfies the requirement futures==3.2.0 (from -r requirements.txt (line 8)) (from versions: 0.2.python3, 0.1, 0.2, 1.0, 2.0, 2.1, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1.0, 3.1.1)
ERROR: No matching distribution found for futures==3.2.0 (from -r requirements.txt (line 8))
Thank you for providing this repo but wondering if this repo is maintained or not? there are lots of dependency issue in the requirement file and time consuming to solve all of those issue.
Please provide instructions on how to use the data set with the code.
Typically, DDI prediction is a pairwise classification problem.
In the given toy example, you artificially generate a small graph.
My concern is that Decagon seems to treat a DDI and its corresponding reverse one as two different edges. But, I am confused by how to calculate the metrics with the predicted results for potential DDI triplets and the reverse ones.
For instance, "Drug A's metabolism is increased when combined with Drug B" (symbolized as triplet (A, metabolism increased, B)
) is semantically equal to the reverse one "Drug B can increase the metabolism of Drug A" (symbolized as triplet (B, increase metabolism, A)
).
Lines 140 to 145 in 86ff6b1
It seems that the model takes into consideration a single edge type on each batch iteration, so it only uses that corresponding W_r, is only that matrix updated on that iteration?
I keep getting the following error when I try and run the code on my laptop with no changes.
Train model
Traceback (most recent call last):
File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1334, in _do_call
return fn(*args)
File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1319, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1407, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InternalError: Unsupported feed type
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 279, in <module>
outs = sess.run([opt.opt_op, opt.cost, opt.batch_edge_type_idx], feed_dict=feed_dict)
File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 929, in run
run_metadata_ptr)
File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1152, in _run
feed_dict_tensor, options, run_metadata)
File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1328, in _do_run
run_metadata)
File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py", line 1348, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InternalError: Unsupported feed type
I don't understand where the problem is. Please help.
The authors did not provide the source code for using the real dataset.
@marinkaz Thank you so much for your work! Would you please explain to me why the adj_mats_orig contains both gene_adj and gene_adj.transpose (the same to drug_drug_adj_list)? I think that a 'gene_adj' is enough, as the code below.
Looking forward to your reply. Thank you!
` #data representation
adj_mats_orig = {
(0, 0): [gene_adj, gene_adj.transpose(copy=True)],
(0, 1): [gene_drug_adj],
(1, 0): [drug_gene_adj],
(1, 1): drug_drug_adj_list + [x.transpose(copy=True) for x in drug_drug_adj_list],
}`
`#In my view, the data representation should be as follows.
adj_mats_orig = {
(0, 0): [gene_adj],
(0, 1): [gene_drug_adj],
(1, 0): [drug_gene_adj],
(1, 1): drug_drug_adj_list,
}`
I viewed the whole code and found that the code only use toy dummy data to train model. So I don't really understand how you use those data to train GCN model. Can you supply the code or instructions about how to use real-world data to train model?
Line 8 in 86ff6b1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.