Let's say I have a network that consists of a single weakly connected component. From various papers I've seen that if you want to use inductive GNNs like GraphSAGE, it is advisable to split your train/test data into two separate graphs or components.
Since I've seen that there are different approaches for node classification and link prediction tasks, I am specifically interested in node classification tasks, possible multiclass classification.
So the train/test split graphs would need to ensure some sort of reasonable class presence in both train and test graphs as well as avoid isolated nodes. I've seen some example where they simply use scikit train/test split, but to me it seems it disregards node connections and there is no guarantee you won't be left with isolated nodes that could skew results.
Could I use something as Louvain, to find communities of nodes, and then split the graph based on communities. In my mind, that would help with the structural integrity of the graph, or are there any better approaches?