The PvT calculation is inconsistent with the paper
Closed this issue · 1 comments
liyingjack commented
The LE is a great idea to learn hypergraph. I have carefully read the paper and code, and I find the calculation of PvT is inconsistent in the code and paper.
-
In paper
The calculation of PvT is gave by the Eqn. (3) in section 3.3
$$P^T_v(v,v_l)=\frac{\frac{1}{\delta(e)}}{\sum_{(v,e')\in\nu_l}{\frac{1}{\delta(e')}}}$$
when$v$ is the vertex part of$v_{l}$ -
In code
weight = np.ones(N_node)
for vertex in range(N_vertex):
tmp = np.where(pairs[:, 0] == vertex)[0]
weight[tmp] = 1. / len(tmp)
PvT = sp.coo_matrix((weight, (pairs[:, 0], np.arange(N_node))),
shape=(N_vertex, N_node), dtype=np.float32) # (N_vertex, N_node)
the PvT in code is calculated by
ycq091044 commented
Sorry for the confusion. You can definitely further normalize it.