mims-harvard / ohmnet Goto Github PK
View Code? Open in Web Editor NEWOhmNet: Representation learning in multi-layer graphs
Home Page: http://snap.stanford.edu/ohmnet
License: MIT License
OhmNet: Representation learning in multi-layer graphs
Home Page: http://snap.stanford.edu/ohmnet
License: MIT License
I am attempting to run ohmnet on the full tissue ppi network from http://snap.stanford.edu/ohmnet/. There appears to be an error with the provided hierarchy file. The following error is produced.
Traceback (most recent call last):
File "main.py", line 66, in <module>
main(args)
File "main.py", line 62, in main
on.embed_multilayer()
File "/local/david/ohmnet/ohmnet/ohmnet.py", line 212, in embed_multilayer
all_nodes, leaf_vectors, internal_vectors)
File "/local/david/ohmnet/ohmnet/ohmnet.py", line 91, in update_internal_vectors
assert len(parents) == 1, 'Problem'
AssertionError: Problem
I am running ohmnet as follows python2.7 main.py --input data/tissues.list --outdir . --hierarchy bio-tissue-hierarchy/tissue.hierarchy
When run on the example brain network provided the code executes properly. I can see that the brain hierarchy seems to follow a different format than the provided tissue hierarchy. Do you have a working tissue hierarchy file or can you guide me on how to construct one?
Thanks!
Hello @marinkaz
Thank you for sharing the code.
I am trying to run it on the given data of brain tissue-specific protein interaction network.
I got following error when I executed python2.7 main.py --input "data/brain.list" --outdir "tmp" --hierarchy "data/brain.hierarchy"
INFO:ohmnet.gensimmod.model.word2vec:training model with 8 workers on 16897 vocabulary and 128 features, using sg=1 hs=0 sample=0.001 negative=5 window=10
INFO:ohmnet.gensimmod.model.word2vec:expecting 84485 sentences, matching count from corpus used for vocabulary survey
Processing: 0/100
Processing: 0/100
Processing: 0/100
Processing: 0/100
Processing: 0/100
Processing: 0/100
Processing: 0/100
Processing: 0/100
Processing: 0/100
Traceback (most recent call last):
File "main.py", line 66, in <module>
main(args)
File "main.py", line 62, in main
on.embed_multilayer()
File "ohmnet/ohmnet/ohmnet.py", line 197, in embed_multilayer
workers=self.n_workers, iter=1, batch_words=pushed_examples)
File "ohmnet/ohmnet/gensimmod/model/word2vec.py", line 416, in __init__
self.train(sentences)
File "ohmnet/ohmnet/gensimmod/model/word2vec.py", line 853, in train
utils.qsize(job_queue), utils.qsize(progress_queue))
AttributeError: 'module' object has no attribute 'qsize'
Could you please help in resolving this error?
Thanks,
Supriya
In the paper it says the regularisation strength is a user specified parameter, but it is non of the command line inputs. Looking though the code it is not clear to me where to set this parameter.
Could you please advise me how to change this parameter.
Dear professiors Marinka Zitnik and Jure Leskovec
I get wrong messages when I want to run Weighted graph.The messages is "TypeError: read_edgelist() got an unexpected keyword argument 'inodetype' โ. and I explored the source code. I find there is a mistake in read_net function which in utility.py file
The source code is " if weighted: G = nx.read_edgelist(inodetype=int, data=(('weight', float),), create_using=nx.DiGraph()) " .It may be fixed as if weighted: G = nx.read_edgelist(fname, nodetype=int, data=(('weight', float),), create_using=nx.DiGraph())
sincerely
He
Hello,
Thank you very much for the code. I have gensim installed via conda with fast_version enabled. But using your code , I don't understand but I always have a slow version used. Any idea ?
Best.
When I run this code, the following error occurs. Could you please help me to figure out what's wrong?
INFO:ohmnet.gensimmod.model.word2vec:loading projection weights from emb/tmp.emb
Traceback (most recent call last):
File "main.py", line 66, in
main(args)
File "main.py", line 62, in main
on.embed_multilayer()
File "/Work/deeplearning/network-analysis/ohmnet/ohmnet/ohmnet.py", line 200, in embed_multilayer
self.model.load_parent_word2vec_format(fname=tmp_fname)
File "/Work/deeplearning/network-analysis/ohmnet/ohmnet/gensimmod/model/word2vec.py", line 1235, in load_parent_word2vec_format
header = utils.to_unicode(fin.readline(), encoding=encoding)
AttributeError: 'module' object has no attribute 'to_unicode'
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.