XuexiongLuoMQ / BraGCL-framework

An Interpretable Brain Graph Contrastive Learning Framework for Brain Disorder Analysis (WSDM 2024 Demo )
Apache License 2.0
2 stars 0 forks source link

setting edge_index for ABIDE dataset #1

Open seongyongbaek opened 1 month ago

seongyongbaek commented 1 month ago

I want to Training using the ABIDE dataset. However, when I imported and executed ABIDE database with the code, Edge_index is 3D, so I wonder what kind of configuration(each column) information this is and how to modify it.

i check the node and edge info Number of nodes: 32 Node features shape: torch.Size([32, 61, 61]) Number of edges: 9172 Edge index shape: torch.Size([3, 9172]) First few edges: tensor([[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [25, 26, 27, 29, 60, 25, 26, 27, 29, 60]]) Edge attributes shape: torch.Size([9172])

if edge tensor means [index, (2x2 matrix feaure)] however, last 31 edge have 31, 91, 84 31, 91, 85 31, 91, 86 31, 91, 87 31, 91, 88 31, 91, 89 31, 91, 90 31, 91, 91 then i wondering Node features shape: torch.Size([32, 61, 61]) how to edge feature has 91? and what is first node and second node?(or start and end edge)

JustinGie commented 6 days ago

I want to Training using the ABIDE dataset. However, when I imported and executed ABIDE database with the code, Edge_index is 3D, so I wonder what kind of configuration(each column) information this is and how to modify it.

i check the node and edge info Number of nodes: 32 Node features shape: torch.Size([32, 61, 61]) Number of edges: 9172 Edge index shape: torch.Size([3, 9172]) First few edges: tensor([[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [25, 26, 27, 29, 60, 25, 26, 27, 29, 60]]) Edge attributes shape: torch.Size([9172])

if edge tensor means [index, (2x2 matrix feaure)] however, last 31 edge have 31, 91, 84 31, 91, 85 31, 91, 86 31, 91, 87 31, 91, 88 31, 91, 89 31, 91, 90 31, 91, 91 then i wondering Node features shape: torch.Size([32, 61, 61]) how to edge feature has 91? and what is first node and second node?(or start and end edge)

I'm sorry for not getting back to you sooner. I do not know why your node features shape is torch.Size([32, 61, 61]). In our work, we get the functional correlation matrix by DPABI with selected atlas, the shape is [X,X]. Then we could construct the dataset with the shape: torch.Size([N, X, X]), where N denotes the size of dataset, X denotes the number of Nodes. This is the input of our framework. Proposed framework calling 'getEdgeIdxAttr' function, which could get the edge of the corresponding graph. In detail, the 'getEdgeIdxAttr' returns two torch.Tensor, first one is 2-D tensor (first row is the source node and second row is the target node), second one is 1-D tensor is the edge weight