Regression prediction: determine the revenue based on a graph #7821
dirkcremers
started this conversation in
General
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.
-
Hi,
I have a question regarding the possibility of predicting the revenue of a graph. The problem is defined as follows:
My main goal involves predicting revenue for a graph, where each node represents a store with its specific characteristics (node features). The stores are interconnected in a fully undirected graph, sharing common information such as possible delivery moments (edge attributes). The data is structured using PyTorch Geometric's Data representation.
Data(node=node_features, edge_index=edge_index, edge_features=edge_features, y=revenue)
To tackle this task, I implemented a GNN called GAT (Graph Attention Network) (see model below (note that num_classes is set equal to one)). However, during training, I observed that the model predicts revenue for individual nodes instead of the entire graph, which is my target variable.
One potential solution is to predict revenue for each store (node) and then aggregate these predictions to obtain the graph-level prediction. One simple approach is summing the predicted revenues for all nodes. In this approach, I would predict the revenue for each node, calculate the sum of these values, and then use this sum to determine the loss and apply backpropagation.
Is the solution proposed above the best approach, or are there more effective alternatives? I am open to any tips or suggestions that could enhance the solution.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions