REGAL icon indicating copy to clipboard operation
REGAL copied to clipboard

Hi Mark, how to construct the joint adj A and the truth alignment adj P?

Open Weifanwong opened this issue 6 years ago • 7 comments

Hi Mark,

Sorry to bother you again. Now I try to use some datasets(arenas-meta.edges) get online as A1 for your REGAL program. As I learned from your paper, the input for this program is a jointed matrix in the form as A = [A1,0;0,A2]. 
The adjacency matrix A1 is the true adj of the network we focus on, while the other matrix A2 is just generated by A2 = P * A1 *P' (P is randomly generated).  
Now, I have constructed both the jointed adjacency matrix A and the true-alignment matrix P as input in your method. But my output result is really bad... I only got 0.02 for score top10. 
I've spent 2 days on contructing the correct-format input file for the program. The input file I constructed and the corresponding code generating it have been upload as appendix.
I'm afraid it would be a bother for you to read my code or find mistakes in it... So would you like to give some more detail about how to construct the joint adj A and the truth alignment file P which respectively respond to the file named "arenas_combined_edges.txt" and the file named "arenas_edges-mapping-permutation" in your program? It would be better if you already have some program deal with this problem and if you can share it with me...

I have been confused on this problem for a long time... I'm looking forward to your reply.

Best wishes, Weifan

code.zip

Weifanwong avatar Dec 10 '18 04:12 Weifanwong

maybe it would look better to send you an e-mail. So I've send one to your mail-box

Weifanwong avatar Dec 10 '18 04:12 Weifanwong

Hey @Weifanwong, did you get an answer to your question? I, too, am confused about how should I combine the two adjacency matrices A1 for graph1 and A2 for graph2 into a new matrix in the format [A1 0; 0 A2]. Can I use the compose method in networkx to merge the two graphs? Would the resulting graph be same as the @markheimann is suggesting? Thanks for your help!

shubhams avatar Apr 26 '19 10:04 shubhams

Hi, sorry for the delay.  Luckily, the author Mark has given me another code to solve this problem and I send it to you right now. I hope this can do some help to you.


And I'll copy parts of email he sent to me that might help you use this code:

However, I’ll give you what I have now to hopefully save us both some trouble. I apologize about the mess. I did add a little bit mostly so you could see a dummy example that was small enough to print out (a 5 node graph and its permutation, combined into one graph, with no noise—plus the true alignments). Hopefully you can see how this code accepts input files containing edgelists as well—so if you want, you should be able to directly use this to create further experiments of your own. In any case, I hope it helps.

(config_extra and xnetmf_extra correspond to the config and xnetmf source files in the REGAL reference implementation)

Best, Weifan On 4/26/2019 18:17,Shubham Singh[email protected] wrote:

Hey @Weifanwong, did you get an answer to your question? I, too, am confused about how should I combine the two adjacency matrices A1 for graph1 and A2 for graph2 into a new matrix in the format [A1 0; 0 A2]. Can I use the compose method in networkx to merge the two graphs? Would the resulting graph be same as the @markheimann is suggesting? Thanks for your help!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

Weifanwong avatar May 09 '19 06:05 Weifanwong

Hi @Weifanwong, thanks for your reply and help, but I could not see any code files in your last comment. If it's not too much trouble, could I ask you to send them to me on my email, [email protected]?

shubhams avatar May 09 '19 15:05 shubhams

Hi @Weifanwong , I am confused about how to combine the two adjacency matrices too. I have spent several days on it and could not achieve good results. If it's not too much trouble, could you please send me the code. Email: [email protected]

FFTD avatar Sep 23 '19 02:09 FFTD

maybe it would look better to send you an e-mail. So I've send one to your mail-box

@Weifanwong您好,我看到了您在REGAL模型下的提问,我运行了REGAL代码,top50的结果是0.008811,作者在图中展示的结果是0.8,他所表示的意思应该是0.8%的准确率吧。您觉得呢?我也不太会处理文章中两个矩阵的形式,请问可以分享给我代码吗,如果数据集也能分享一下的话,就太好啦,谢谢您啦~打扰了,很抱歉,期待您的回复。我的邮件是:[email protected]

renzunxiao avatar Mar 25 '20 09:03 renzunxiao

@Weifanwong 您好,我遇到了相同的问题,不知道如何连接两个邻接矩阵,不知道您能不分享一下您的代码。抱歉打扰了,诚盼您的回复。我的邮箱是:[email protected]

1017yxc avatar Jun 07 '24 15:06 1017yxc