yifan-h / cs-gnn Goto Github PK
View Code? Open in Web Editor NEWMeasuring and Improving the Use of Graph Information in Graph Neural Networks
License: MIT License
Measuring and Improving the Use of Graph Information in Graph Neural Networks
License: MIT License
Nice to meet you, I am interesting in your paper in 2020ICLR-"MEASURING AND IMPROVING THE USE OF GRAPH INFORMATION IN GRAPH NEURAL NETWORKS".But when I plan to caculate some feature smoothness,I found it has some difference.I wish you could help me out!
To caculate the feature smoothness of dataset --cora, I use the folloing codes:
result=np.zeros(features.shape[1])
for i in range(features.shape[0]):
z=np.zeros((1,features.shape[1]))
for j in range(features.shape[0]):
if adj[i,j]==1 and i!=j:
z+=features[i].toarray()-features[j].toarray()
zz=np.squeeze(z)
result+=zz*zz
result=np.sum(result)/(features.shape[1]*5429)
print(result)
But the result of my codes is so big.I'm little confused !
THANKS A LOT!
I find that when computing feature smoothness, the code uses the function feature_broadcast
(I find it's to merge feature of a node with its neighbors).
for i in range(times):
feats = feature_broadcast(feats, G_org)
I find the formula in paper just used original feats with normalization. So I wonder why we need to calculate this feature broadcast?
The similar problem is on label_broadcast
, which I think it's to remove some edges randomly. Why we need to do that?
Thanks for sharing the code! @yifan-h
Do you have some experimental results comparing CS-GNN
vs GAT
on PPI
?
Hi. yifan, sorry to disturb you again. There is a error AttributeError: 'Graph' object has no attribute 'selfloop_edges'
in utils.py: G.remove_edges_from(G.selfloop_edges())
, How can i to solve it? Thanks.
I have try to normalize the feature of dataset cora. But it does'n work...
The dataset -cora I used is in GCN(17-kipf), and I found its features are normalized in advance. It's so strange....
some data of trained feature of cora
(0, 19) 1.0
(0, 81) 1.0
(0, 146) 1.0
(0, 315) 1.0
(0, 774) 1.0
(0, 877) 1.0
(0, 1194) 1.0
(0, 1247) 1.0
(0, 1274) 1.0
(1, 19) 1.0
(1, 88) 1.0
(1, 149) 1.0
(1, 212) 1.0
(1, 233) 1.0
(1, 332) 1.0
(1, 336) 1.0
(1, 359) 1.0
(1, 472) 1.0
(1, 507) 1.0
(1, 548) 1.0
(1, 687) 1.0
(1, 763) 1.0
(1, 808) 1.0
(1, 889) 1.0
(1, 1058) 1.0
: :
(1706, 1236) 1.0
(1706, 1242) 1.0
(1706, 1320) 1.0
(1706, 1337) 1.0
(1707, 4) 1.0
(1707, 118) 1.0
(1707, 153) 1.0
(1707, 180) 1.0
(1707, 228) 1.0
(1707, 699) 1.0
(1707, 701) 1.0
(1707, 719) 1.0
(1707, 750) 1.0
(1707, 758) 1.0
(1707, 810) 1.0
(1707, 911) 1.0
(1707, 1177) 1.0
(1707, 1233) 1.0
(1707, 1251) 1.0
(1707, 1257) 1.0
(1707, 1262) 1.0
(1707, 1299) 1.0
(1707, 1325) 1.0
(1707, 1386) 1.0
(1707, 1397) 1.0
In my recent learning, I'm unsure how to caculate
Hi. Yifan, when I run the code, there is a error:AttributeError: 'Graph' object has no attribute 'node'
in such file: utils.py line 23: if not 'val' in G.node[node] or not 'test' in G.node[node]:
, would you please tell me how to solve it? Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.