Giter Club home page Giter Club logo

benedekrozemberczki / diff2vec Goto Github PK

View Code? Open in Web Editor NEW
120.0 6.0 20.0 4 MB

Reference implementation of Diffusion2Vec (Complenet 2018) built on Gensim and NetworkX.

Home Page: https://karateclub.readthedocs.io

License: GNU General Public License v3.0

Python 100.00%
diff2vec deepwalk node2vec struc2vec gensim tensorflow unsupervised-learning graph-embedding node-embedding network-embedding embedding factorization diffusion implicit-factorization machine-learning deep-learning semisupervised-learning neural-network complex-networks embeddings

diff2vec's Issues

joblib.my_exceptions.JoblibTypeError: JoblibTypeError

mldl@ub1604:~/ub16_prj/diff2vec$ python src/diffusion_2_vec.py
lapack_opt_info:
libraries = ['openblas']
library_dirs = ['/usr/local/lib']
language = f77
blas_opt_info:
libraries = ['openblas']
library_dirs = ['/usr/local/lib']
language = f77
openblas_info:
libraries = ['openblas']
library_dirs = ['/usr/local/lib']
language = f77
openblas_lapack_info:
libraries = ['openblas']
library_dirs = ['/usr/local/lib']
language = f77
blas_mkl_info:
NOT AVAILABLE


Feature extraction starts.

0%| | 0/10 [00:00<?, ?it/s]Traceback (most recent call last):
File "src/diffusion_2_vec.py", line 60, in
main(args)
File "src/diffusion_2_vec.py", line 54, in main
walks = run_parallel_feature_creation(args.input, args.vertex_set_cardinality, args.num_diffusions, args.workers)
File "src/diffusion_2_vec.py", line 35, in run_parallel_feature_creation
results = Parallel(n_jobs = num_of_workers)(delayed(create_features)(i, edge_list_path, vertex_set_cardinality) for i in tqdm(range(number_of_replicates)))
File "/usr/local/lib/python2.7/dist-packages/joblib/parallel.py", line 789, in call
self.retrieve()
File "/usr/local/lib/python2.7/dist-packages/joblib/parallel.py", line 740, in retrieve
raise exception
joblib.my_exceptions.JoblibTypeError: JoblibTypeError

KeyError: "word '3' not in vocabulary"

I construct my custom edgelist.csv as instructed, and this error shows up:
2020-10-25 15:10:28,162 : INFO : training on a 8376460 raw words (8376460 effect
ive words) took 143.0s, 58587 effective words/s
Traceback (most recent call last):
File ".../src/diffusion_2_vec.py", line 121, i
n
main(args)
File ".../src/diffusion_2_vec.py", line 117, i
n main
learn_pooled_embeddings(walks, counts, args)
File ".../src/diffusion_2_vec.py", line 63, in
learn_pooled_embeddings
save_embedding(args, model, counts)
File ".../src/diffusion_2_vec.py", line 95, in
save_embedding
out.append([int(node)-1] + list(model.wv[str(node-1)]))
File "D:\Anaconda3\envs\py36\lib\site-packages\gensim\models\keyedvectors.py",
line 353, in getitem
return self.get_vector(entities)
File "D:\Anaconda3\envs\py36\lib\site-packages\gensim\models\keyedvectors.py",
line 471, in get_vector
return self.word_vec(word)
File "D:\Anaconda3\envs\py36\lib\site-packages\gensim\models\keyedvectors.py",
line 468, in word_vec
raise KeyError("word '%s' not in vocabulary" % word)
KeyError: "word '3' not in vocabulary"

How could I solve this problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.