Giter Site home page Giter Site logo

Problem running `test.py` about gem HOT 3 CLOSED

palash1992 avatar palash1992 commented on May 24, 2024
Problem running `test.py`

from gem.

Comments (3)

palash1992 avatar palash1992 commented on May 24, 2024

Yes, I had initially set the path to "gem/data/karate.edgelist" assuming that the code will be run from GEM but modified it to "karate.edgelist" so that the user can install the package and run the code from any directory with input file.

The above error was due to inconsistency between readme and test and has been fixed. The graphreconstruction was modified to return mean square error along with MAP and precision.

from gem.

rougier avatar rougier commented on May 24, 2024

Some progress (I got some pictures) but still some issues:

Num nodes: 34, num edges: 77
[Errno 2] No such file or directory: 'node2vec': 'node2vec'
Traceback (most recent call last):
  File "/Users/rougier/tmp/GEM/gem/embedding/node2vec.py", line 80, in learn_embedding
    call(args)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 304, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 756, in __init__
    restore_signals, start_new_session)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1499, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'node2vec': 'node2vec'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test.py", line 48, in <module>
    Y, t = embedding.learn_embedding(graph=G, edge_f=None, is_weighted=True, no_python=True)
  File "/Users/rougier/tmp/GEM/gem/embedding/node2vec.py", line 83, in learn_embedding
    raise Exception('./node2vec not found. Please compile snap, place node2vec in the system path and grant executable permission')
Exception: ./node2vec not found. Please compile snap, place node2vec in the system path and grant executable permission

In any case, I'm totally clueless about the output (I don't know what I'm supposed to see and what is actually computed).

from gem.

palash1992 avatar palash1992 commented on May 24, 2024

In the installation instructions, there is a special installation for node2vec (To install node2vec as part of the package, recompile from https://github.com/snap-stanford/snap and add node2vec executable to system path. To grant executable permission, run: chmod +x node2vec).

You can also test the rest of the methods by commenting out line 38 in test.py which loads node2vec model. But otherwise, node2vec installation is required.

For the output, I will add a toy example by the end of the day. Just to make it clear for now, test.py outputs the evaluation of graph reconstruction and network visualization on Karate dataset for all the models in the package, hence comparing them.

from gem.

Related Issues (20)

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.