can't split HeteroData with RandomNodeSplit #9133
-
import networkx as nx Load pre-trained Word2Vec modelwv_model = api.load("glove-wiki-gigaword-50") def encode_text(text): scaler = StandardScaler() def preprocess_data(data): def scale_numerical_features(data, features): def encode_categorical_features(data, features): def create_bipartite_graphs(data):
def add_node_features(user_restaurant_graph, user_category_graph, data):
def add_edge_features(user_restaurant_graph, user_category_graph, data):
def encode_node_features(node_data):
def create_pyg_data(graph, node_type1, node_type2, node_type3=None):
def create_combined_data(user_restaurant_graph, user_category_graph, preprocessed_data):
def main():
if name == 'main':
This is the combined_data even after the split: My issues is why after using the RandomNodeSplit, it didn't split the data to train, val and test_masks.. So is there anything i'm doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 16 replies
-
Where do you define your labels? Currently, |
Beta Was this translation helpful? Give feedback.
-
Thank you so much, I did everything as expected. |
Beta Was this translation helpful? Give feedback.
-
combined data: HeteroData( I got this after putting my Label(y) in place… Is it correct? |
Beta Was this translation helpful? Give feedback.
-
Yes, because the code is centered on the user node. |
Beta Was this translation helpful? Give feedback.
Yes, this looks better.