Giter Site home page Giter Site logo

pscn's People

Contributors

tvayer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pscn's Issues

Implementing with other datasets

Hi, I'm having a hard time implementing the algorithm with my own dataset.

I have a dataset of networkx objects, say, n graphs. I transformed the networkx objects to the Graph class included in the package, but I keep getting error after error. Is it possible to load a dataset different from the ones included in the data folder? What would you recommend?

EDIT: I can run the base code with no problems with any default dataset.

Problem with pynauty - Windows

Hello. I'm trying to run it on Windows (Although it seems that the problem is missing directory so it will happen at Linux as well.

yehonata@YEHONATA-TP MINGW64 ~/PycharmProjects/PSCN-master/pynauty-0.6
$ make pynauty
cd nauty; ./configure CFLAGS='-O4 -fPIC'
/usr/bin/sh: line 0: cd: nauty: Not a directory
/usr/bin/sh: ./configure: No such file or directory
make: *** [nauty/config.log] Error 127

When I change the line in make file:
NAUTY_DIR = nauty27rc1
Instead of
NAUTY_DIR = nauty
(Which is a file, not a dir)

I get the following error:

`make[1]: Leaving directory `C:/Users/yehonata/PycharmProjects/PSCN-mas                                                                                                                                                                       ter/pynauty-0.6.0/nauty27rc1'
python setup.py build
running build
running build_py
creating build
creating build\lib.win32-2.7
creating build\lib.win32-2.7\pynauty
copying src\graph.py -> build\lib.win32-2.7\pynauty
copying src\__init__.py -> build\lib.win32-2.7\pynauty
running build_ext
building 'pynauty.nautywrap' extension
error: Unable to find vcvarsall.bat
make: *** [pynauty] Error 1
`

What am I missing? Thanks

Problem with Linux - Pynauty

Hello, I've switched to Linux after I couldn't run it with windows.

Now when I execute make pynauty I get the following error:

`build/temp.linux-x86_64-3.7/src/nautywrap.o -O4 -fPIC
In file included from src/nautywrap.c:16:0:
nauty/nauty.h:43:0: warning: "_FILE_OFFSET_BITS" redefined [enabled by default]
 #define _FILE_OFFSET_BITS 0
 ^
In file included from /home/yehonata/miniconda3/include/python3.7m/Python.h:8:0,
                 from src/nautywrap.c:15:
/home/yehonata/miniconda3/include/python3.7m/pyconfig.h:1494:0: note: this is the location of the previous definition
 #define _FILE_OFFSET_BITS 64
 ^
gcc -pthread -shared -B /home/yehonata/miniconda3/compiler_compat -L/home/yehonata/miniconda3/lib -Wl,-rpath=/home/yehonata/miniconda3/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/src/nautywrap.o nauty/nauty.o nauty/nautil.o nauty/naugraph.o nauty/schreier.o nauty/naurng.o -o build/lib.linux-x86_64-3.7/pynauty/nautywrap.cpython-37m-x86_64-linux-gnu.so
/home/yehonata/miniconda3/compiler_compat/ld: nauty/naugraph.o: relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/home/yehonata/miniconda3/compiler_compat/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
make: *** [pynauty] Error 1
`

What is wrong here?

something about pscn.py

hello,
Thanks very much! I have learned a lot from your work.
For your Function"rank_label_wrt_dict" at pscn.py, i have another thought.
We can make 'distance_to_root' and 'betweenness_centrality' as the attributes of nodes in subgraph.Then,the code like this:

iterator = G.nodes(data=True)
sorted(iterator,key=lambda item:(item[1]['distance_to_root'],-item[1]['betweenness_centrality']))

What do you think about this thought?Could you give me some advice.

The number of nodes selected

Hello,
I'm sorry to disturb you again.
I would like to ascertain one case:
The number of nodes selected is larger than that of all nodes in the graph (w = 30, but there are only 20 nodes in the graph). So is the dumb node added or a node selected many times?

Import Error

After installing pynauty, run the first cell in receptive_field_maker_example.ipynb returned importError:

ImportError: dlopen(/Users/sunhuayan/Library/Python/3.6/lib/python/site-packages/pynauty/nautywrap.cpython-36m-darwin.so, 2): Symbol not found: _dispatch_graph
Referenced from: /Users/sunhuayan/Library/Python/3.6/lib/python/site-packages/pynauty/nautywrap.cpython-36m-darwin.so
Expected in: flat namespace
in /Users/sunhuayan/Library/Python/3.6/lib/python/site-packages/pynauty/nautywrap.cpython-36m-darwin.so

Could you please tell me how to fix this? Many THX~

rank_label_wrt_dict error

Hi,
Really appreciate the code you've published for your paper! It has been incredibly helpful.

While running the code, I noticed I was getting an intermittent error, saying that certain nodes were not in the graph when calculating single_source_dijkstra_path_length in labeling_to_root. This error only happened sometimes and when restarting kernels or re-running the code a few times, would disappear and reappear for later runs.

It turns out, there was an issue in rank_label_wrt_dict. As you are looping through all_distinc_labels (i.e. list(set(label_dict.values()))), the labels were not always ordered, which meant that we were looping through the labels in the wrong order. For a small k, this resulted in the vertex of interested having a rank higher than k and therefore disappearing from the subgraph of interest. This is why the error would come up. I assume that the error would disappear at times because label_dict is a dictionary so sometimes, and as dictionaries are unordered, the order of the list would change depending on how it was saved in memory at that time.

The simple fix was to add all_distinc_labels.sort() after creating all_distinc_labels. This has fixed my problem. I was wondering whether this might also affect some results as even though the k was large enough to capture the majority of vertices regardless of order, the order of the resulting re-ordered vertices in the normalised receptive fields was not correct?

Note that this didn't happen very often to me but it happened enough for it to break my code 50% of the time.

Hope this helps!

pynauty update

Hi,
I am the author of pynauty. I have recently moved the package to Github - pynauty and updated it. I also made it available from PyPi - pynauty, many binary wheels are also provided. If a system is not compatible with the provided binary wheels pip attempts to build the wheel of the extension module on the local machine.

I believe that solves issues #8 #9

reshape error

Hi,
Thanks for your great work! And I set :PSCN(w=25,k=3,epochs=10,batch_size=32,verbose=2,attr_dim=100)
but I got an issue as follow:

--> 157             train.append(np.array(result).reshape(self.k*self.w,self.attr_dim))
    158         X_preprocessed=np.array(train)
    159         end=time.time()

ValueError: cannot reshape array of size 7400 into shape (75,100)

I tried to solve this problem, but it was unsuccessful. Could you help me?

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.