Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Definition of e_weight leads to incorrect values of v_reg_sum #3

Open
yinyee opened this issue Apr 29, 2021 · 0 comments
Open

Definition of e_weight leads to incorrect values of v_reg_sum #3

yinyee opened this issue Apr 29, 2021 · 0 comments

Comments

@yinyee
Copy link

yinyee commented Apr 29, 2021

In line 366, the values of e_weight are set to (1/w if w>0 else 1) for w in authorwt. Why?

Assuming that the w values in authorwt correspond to edge degrees, it seems to lead to an incorrect computation of v_reg_sum.

Using this hypergraph as an example:
Screenshot 2021-04-29 at 19 37 47
(Changing the indices from 1-based to 0-based)

authorwt = [ 2 , 4 , 1 ]

paper_author[0] = [ 0 , 0 ]
paper_author[1] = [ 1 , 0 ]
paper_author[2] = [ 1 , 1 ]
paper_author[3] = [ 2 , 1 ]
paper_author[4] = [ 3 , 1 ]
paper_author[5] = [ 3 , 2 ]
paper_author[6] = [ 4 , 1 ]

Following line 366

e_weight[0] = 0.5
e_weight[1] = 0.25
e_weight[2] = 1

Assuming alpha_v = 1, the results of line 382 should be:

e_reg_weight[0] = 0.5
e_reg_weight[1] = 0.5
e_reg_weight[2] = 0.25
e_reg_weight[3] = 0.25
e_reg_weight[4] = 0.25
e_reg_weight[5] = 1
e_reg_weight[6] = 0.25

And paper2sum in line 383 should be:

paper2sum[0] = [0.5]
paper2sum[1] = [0.5, 0.25]
paper2sum[2] = [0.25]
paper2sum[3] = [0.25, 1]
paper2sum[4] = [0.25]

Then in line 393, v_reg_sum should be:

v_reg_sum[0] = 0.5
v_reg_sum[1] = 0.75
v_reg_sum[2] = 0.25
v_reg_sum[3] = 1.25
v_reg_sum[4] = 0.25

But according to the definition of the normalisation denominator in the the paper:
Screenshot 2021-04-29 at 19 37 34
the denominator matrix should be:

     [0]   [1]   [2]   [3]   [4]
[0]   2     0     0     0     0
[1]   0     2+4   0     0     0
[2]   0     0     4     0     0
[3]   0     0     0     4+1   0
[4]   0     0     0     0     4

By setting the values of e_weight in line 366 to w instead, we get:

e_weight[0] = 2
e_weight[1] = 4
e_weight[2] = 1

Then the results of line 382 should become:

e_reg_weight[0] = 2
e_reg_weight[1] = 2
e_reg_weight[2] = 4
e_reg_weight[3] = 4
e_reg_weight[4] = 4
e_reg_weight[5] = 1
e_reg_weight[6] = 4

And paper2sum in line 383 should become:

paper2sum[0] = [2]
paper2sum[1] = [2, 4]
paper2sum[2] = [4]
paper2sum[3] = [4, 1]
paper2sum[4] = [4]

Then in line 393, v_reg_sum should be:

v_reg_sum[0] = 2
v_reg_sum[1] = 6
v_reg_sum[2] = 4
v_reg_sum[3] = 5
v_reg_sum[4] = 4

which corresponds to the definition given in the paper. Ditto for v_weight and e_reg_sum.

@yinyee yinyee changed the title Definition of e_weight as 1/w if w>0 else 1 leads to incorrect values of v_reg_sum Definition of e_weight leads to incorrect values of v_reg_sum Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant