JunqiAug / DwHGCN

7 stars 0 forks source link

the code about the construction of the similarity matirx of a hypergraph #2

Open JianhCode opened 6 months ago

JianhCode commented 6 months ago

I have made multiple attempts to independently write code to obtain the weights (w) of hyperedges for constructing the hypergraph similarity matrix, but have not achieved the expected results. I would greatly appreciate it if the authors could provide the relevant code.

JunqiAug commented 6 months ago

code.zip

Check the code here. Main1 is used to calculate the incidence matrix H. Laplacian_learning is used to calculate the initial weights (w) for the hyperedges. These are the inputs in the dwHGCN model and the weights will be updated in the training.

Please let me know if you have other questions.

JianhCode commented 6 months ago

Thank you very much for providing the code. It has been tremendously helpful to me. I have a question regarding the 'laplacian_learning.m' file. The expression of the Laplacian matrix in the objective function for minimizing the optimization problem differs from what is used in the paper. Could you provide a brief explanation of this discrepancy? Once again, thank you very much. minimize (trace(Y'*((H*diag(w)*AA*H'*A).*B-H*diag(w)*AA*H')*Y)+beta*sum_square_abs(w))