RandomLinkSplit
and LinkNeighborLoader
seem to sample ordinary subgraph or graph with Isolated node in directed heterogeneous graph
#9552
Unanswered
0zero000zero0
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It seems that
RandomLinkSplit
andLinkNeighborLoader
often sample ordinary subgraph in directed heterogeneous graph.I don't it is a bug or something wrong with my code.
Here I have a directed heterogeneous graph , and use
RandomLinkSplit
to split data as train data and test data:The train data as follow:
Then I use
LinkNeighborLoader
to sample and load data to train my model:As you can see, there are some nodes but aren not edges in the subgraph . When I use a larger
num_neighbors
such asnum_neighbors=[5,2]
, the number of edge is not zero , but there is isolated node:I tried different parameter combination (such as
add_negative_train_samples
,disjoint_train_ratio
,neg_sampling_ratio
,num_neighbors
) , but still don't work.I am curious about the process and principles of sampling
I gauss the it is a bug because of approximate way of sampling.
Here are my equipment information:
operating system:Window11 23H2
python : 3.12.3
related packes verson:
torch=2.2.1+cu118
torch_cluster=1.6.3+pt22cu118
torch_geometric = 2.5.3
torch_scatter =2.1.2+pt22cu118
torch_sparse =0.6.18+pt22cu118
torch_spline_conv =1.2.2+pt22cu118
Beta Was this translation helpful? Give feedback.
All reactions