Git Product home page Git Product logo

pgd's Issues

number of nodes

Hi there! I tried to apply the method to the CiteSeer dataset with edgelist.txt as input. The input has 3312 nodes, but the --macro returned 3264 nodes. There's no isolated node in the dataset. The number of edges didn't match either. Has anyone met this problem?

Compilation Issue

When running make, I get the following output

g++ -O3 -fopenmp -ffast-math -funroll-loops -fno-strict-aliasing -fomit-frame-pointer -fexpensive-optimizations -funroll-loops -fmove-loop-invariants -fprefetch-loop-arrays -ftree-loop-optimize -ftree-vect-loop-version -ftree-vectorize -o pgd graphlet_driver.o graphlet_utils.cpp graphlet_core.cpp graphlet_rand.cpp
graphlet_driver.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make: *** [pgd] Error 1

Is this an issue with my environment's setup or with the build process? I got the same error on two machines.
Thanks

Fixing Compile Issue on macOS 10.13 High Sierra and GCC 7.2.0

When compiling using gcc 7.2.0 on macOS 10.13 High Sierra, I encountered the following error:

graphlet_utils.cpp: In function 'bool fexists(const char*)':
graphlet_utils.cpp:42:12: error: cannot convert 'std::ifstream {aka std::basic_ifstream<char>}' to 'bool' in return
     return ifile;
            ^~~~~
make: *** [pgd] Error 1

I changed 'return ifile;' to be 'return (bool)ifile;' and was able to compile successfully.

Reference: https://stackoverflow.com/questions/38659115/make-fails-with-error-cannot-convert-stdistream-aka-stdbasic-istreamchar

Invalid Micro Counts

Running PGD with the --micro flag yields incorrect micro counts.
For example, on a graph with two tailed triangles, PGD is counting zero tailed triangles for each edge.

Graph tested

Edgelist:

1,2
1,3
2,3
2,4
3,5

image

PGD output

[reading generic edge list: read_edge_list func]  filename: ./double_tailed_triangle.edgelist
|V|: 5
|E|: 5
p: 0.5
d_max: 3
d_avg: 2
r = -0.5625
K = 2
************************************************************
total_2_1edge = 5
total_2_indep = 5
----------------------------------------
total_3_tris = 1
total_2_star = 4
total_3_1edge = 4
total_3_indep = 1
----------------------------------------
total_4_clique = 0
total_4_chordcycle = 0
total_4_tailed_tris = 2
total_4_cycle = 0
total_3_star = 0
total_4_path = 1
----------------------------------------
total_4_1edge = 0
total_4_2edge = 0
total_4_2star = 2
total_4_tri = 0
total_4_indep = 0
************************************************************
--------------------------------------------------------------------------------


Micro graphlet statistics
--------------------------------------------------------------------------------
src,dst,triangle,2-star,4-clique,4-chordal-cycle,4-tailed-triangle,4-cycle,3-star,4-path
3,2,1,2,0,0,0,0,0,1
1,2,1,1,0,0,0,0,0,0
1,3,1,1,0,0,0,0,0,0
5,3,0,2,0,0,0,0,1,0
4,2,0,2,0,0,0,0,1,0

graphlet decomposition time: 2.40803e-05 sec
--------------------------------------------------------------------------------
Graphlet Frequency Distribution (GFD)
--------------------------------------------------------------------------------
4-clique     	0
4-chordal-cycle	0
4-tailed-tri	0.4
4-cycle       	0
3-star       	0
4-path       	0.2
4-node-1-tri   	0
4-node-2-star  	0.4
4-node-2-edge	0
4-node-1-edge  	0
4-node-indep  	0


--------------------------------------------------------------------------------
Connected Motif Graphlet Frequency Distribution (GFD)
--------------------------------------------------------------------------------
4-clique     	0
4-chordal-cycle	0
4-tailed-tri	0.666667
4-cycle       	0
3-star       	0
4-path       	0.333333


--------------------------------------------------------------------------------
Disconnected Motif Graphlet Frequency Distribution (GFD)
--------------------------------------------------------------------------------
4-node-1-tri   	0
4-node-2-star	1
4-node-2-edge  	0
4-node-1-edge  	0
4-node-indep  	0


mean	= 0
median	= 0
max	= 0
min	= 0
range	= 0
std	= 0
var	= 0
iqr	= 0
q1	= 0
q3	= 0

input file format csv or mtx

Thank you for making your code public. I want to use this for comparing two networks. If I take a small, well studied graph: karate club; changing the edge-list to .mtx and then giving that as input to pgd isn't working. Here is what I do:

  1. I changed the KC edge-list file to mtx as so:
%% Karate Club Graph (graph is undirected, each edge is saved twice)
%% Nodes: 34 Edges:78*2=156
34 34 78
0 1
0 2
<snip>

Then I tried to do: /pgd -f kc.mtx

On the other hand, if I change the original edgelist file by removing the comments and replace them with a header line: src,dst it seems to work, so the whole thing on MatrixMarket input file format is confusing, but I'm sure I'm missing part of the big-picture.

can we get other modify?

Hi, can we get other modify except the follow:
triangle,2-star,4-clique,4-chordal-cycle,4-tailed-triangle,4-cycle,3-star,4-path

command was killed by system

hi, today I run this command (./pgd -f europe-airports.mtx --macro sample_graph.macro)in Ubuntu system, but soon the shell was killed, I think that I have enough memory. If you know why, please let me know, thinks.
there is some information about dataset:
europe-airports: nodes:399, edges:5995, mean_degree:30.050125, mean_path:2.323611 , mean_clustering:0.539272, degree_assortativity: -0.22479390366

The vertex ids are different between input and output

Thank you very much for your open code! But these is something wrong when I try to use these code.

I use the edge list as the input of PGD as follow:

1 2
1 6
1 4
4 5
4 3
3 5

The output of the PGD is :

% src,dst,triangle,2-star,4-clique,4-chordal-cycle,4-tailed-triangle,4-cycle,3-star,4-path
6,5,1,0,0,0,0,0,0,0
5,4,1,1,0,0,0,0,0,0
6,4,1,1,0,0,0,0,0,0
2,1,0,2,0,0,0,0,1,0
3,1,0,2,0,0,0,0,1,0
4,1,0,4,0,0,0,0,2,4

It's easy to see that the vertex ids are different between input and output
So do you have any method to solve it ?

Best Regards

Error in compilation

Hello,

Thanks for sharing your implementation

However, I cannot compile the program on my computer, I am on Ubuntu 20.04

Here is the error message :

graphlet_utils.cpp: In function ‘bool fexists(const char*)’:
graphlet_utils.cpp:42:12: error: cannot convert ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} to ‘bool’ in return
   42 |     return ifile;
      |            ^~~~~
make: *** [Makefile:47: pgd] Error 1

Thank you for your help

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.