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

Why I put a pair of same graph and it gives me 0.5 of similarity? #46

Open
Lost-little-dinosaur opened this issue Jan 11, 2023 · 6 comments

Comments

@Lost-little-dinosaur
Copy link

Lost-little-dinosaur commented Jan 11, 2023

Hi~
I ran the code, it is logical and clear, I like it.
But I when I try to let it compute my own gragh data, I am confuse...
I have change it's default training time and let it train for 1000 times, it's lose perfrom like this:
myplot
It is very good, isn't it? The lose is bellow 0.01. But when I try to input two same gragh data (like this)
image
and hope it can give me 1 of similarity, but I get a similarity about 0.5
Then I try some other graph data that have different size, they all give me a similarity between 0.39-0.5

Why is that? I can show you how do I get the similarity:
image
Is there any problem? Can you pleace help me? Thank you in advance.

@Lost-little-dinosaur
Copy link
Author

Lost-little-dinosaur commented Jan 12, 2023

And I also want to know the meaning of the label

I know that the label array means the feature of each node...But how can I change the feature in to more complex one such as string?
In fact, I am trying to use this project to compare two ast trees that come from two code project, so my label's value will be the source code of the two project... I will calulate the relationship between by calulate the similaraty of each string...

Can you help me, pleace?

@Lost-little-dinosaur
Copy link
Author

I have already gave this project a star....
Can you help me, please?

@lower01
Copy link

lower01 commented Oct 24, 2023

I have already gave this project a star.... Can you help me, please?

Hello brother, like you, I constructed the graph data myself and then output the similarity based on prediction. Even for the same data, it is around 0.5, which I can’t understand. Do you understand the problem now?

@lower01
Copy link

lower01 commented Oct 24, 2023

Hello brother, like you, I constructed the graph data myself and then output the similarity based on prediction. Even for the same data, it is around 0.5, which I can’t understand. Do you understand the problem now?

@zcyyyy24
Copy link

zcyyyy24 commented Jan 8, 2024

Hi~ I ran the code, it is logical and clear, I like it. But I when I try to let it compute my own gragh data, I am confuse... I have change it's default training time and let it train for 1000 times, it's lose perfrom like this: myplot It is very good, isn't it? The lose is bellow 0.01. But when I try to input two same gragh data (like this) image and hope it can give me 1 of similarity, but I get a similarity about 0.5 Then I try some other graph data that have different size, they all give me a similarity between 0.39-0.5

Why is that? I can show you how do I get the similarity: image Is there any problem? Can you pleace help me? Thank you in advance.

同学你好!我想问一下你是怎么计算两张图之间的相似度?我也是想把节点特征增加几个,不知道这样SimGNN能不能计算相似度?

@zcyyyy24
Copy link

zcyyyy24 commented Jan 8, 2024

Hello brother, like you, I constructed the graph data myself and then output the similarity based on prediction. Even for the same data, it is around 0.5, which I can’t understand. Do you understand the problem now?

同学你好!请问你是怎么计算两张图之间的相似度?如果想增加节点特征该怎么修改代码呢?

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

3 participants