PGD icon indicating copy to clipboard operation
PGD copied to clipboard

The vertex ids are different between input and output

Open zhouchunpong opened this issue 4 years ago • 3 comments

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

zhouchunpong avatar Oct 25 '19 13:10 zhouchunpong

Hi, It seems you should use the input file with the extension $.mtx$ and other extension file will occur some error with node index.

For example:

# cat test.mtx
%%MatrixMarket matrix coordinate pattern symmetric 
6 6 6
1 2
1 6
1 4
4 5
4 3
3 5

Output:

# cat test.micro
% src,dst,triangle,2-star,4-clique,4-chordal-cycle,4-tailed-triangle,4-cycle,3-star,4-path
4,1,0,4,0,0,0,0,2,4
5,4,1,1,0,0,0,0,0,0
3,4,1,1,0,0,0,0,0,0
5,3,1,0,0,0,0,0,0,0
2,1,0,2,0,0,0,0,1,0
6,1,0,2,0,0,0,0,1,0

BTW, it's been a while since you asked the question. Have you find an alternative algorithm to calucate the motif counts for each edge?

seven-echo avatar Mar 19 '20 13:03 seven-echo

Hi, this code may be helpful ORCA - ORbit Counting Algorithm: https://github.com/thocevar/orca

zhouchunpong avatar Apr 11 '20 11:04 zhouchunpong

Hi, this code may be helpful ORCA - ORbit Counting Algorithm: https://github.com/thocevar/orca

Thanks for your sharing.

seven-echo avatar Apr 11 '20 11:04 seven-echo