{
  "id": 582408,
  "title": "Possible Graph Neural Network Approach",
  "url": "/competitions/cmi-detect-behavior-with-sensor-data/discussion/582408",
  "author_name": "Tom",
  "post_date": "2025-05-31T02:17:42.621000",
  "votes": 13,
  "comment_count": 8,
  "views": 0,
  "content": "<p>I observe that the <code>acc</code> (Linear acceleration along three axes) and <code>rot</code> (Orientation data which combines information from the IMU's gyroscope, accelerometer, and magnetometer to describe the device's orientation in 3D space) columns represent two 3D positional structures. It seems possible to create a graph based on this data and add temporal positional embeddings to represent the timesteps. We might can just ignore these two types of columns cuz we have already built two graphs that represent the structure information. </p>\n<p>So here are two possible initial tasks for graph I come up with:</p>\n<ul>\n<li>Node classification: classify gesture for each node (each timestep) and summarize the all the result with gbdts</li>\n<li>Graph classification: directly summarize the graph to predict the gesture. </li>\n</ul>\n<p>If it works, it's three straight compeititons (CIBMTR, BYU, and CMI) I use GNN to solve the problem.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4310004%2F6bfd923e76a9e97ddaec36f53bf7cce5%2F123.png?generation=1748659270426213&amp;alt=media\" alt=\"\"></p>",
  "messages": [
    {
      "id": 3214137,
      "postDate": "2025-05-31T02:17:42.620Z",
      "content": "<p>I observe that the <code>acc</code> (Linear acceleration along three axes) and <code>rot</code> (Orientation data which combines information from the IMU's gyroscope, accelerometer, and magnetometer to describe the device's orientation in 3D space) columns represent two 3D positional structures. It seems possible to create a graph based on this data and add temporal positional embeddings to represent the timesteps. We might can just ignore these two types of columns cuz we have already built two graphs that represent the structure information. </p>\n<p>So here are two possible initial tasks for graph I come up with:</p>\n<ul>\n<li>Node classification: classify gesture for each node (each timestep) and summarize the all the result with gbdts</li>\n<li>Graph classification: directly summarize the graph to predict the gesture. </li>\n</ul>\n<p>If it works, it's three straight compeititons (CIBMTR, BYU, and CMI) I use GNN to solve the problem.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4310004%2F6bfd923e76a9e97ddaec36f53bf7cce5%2F123.png?generation=1748659270426213&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "I observe that the `acc` (Linear acceleration along three axes) and `rot` (Orientation data which combines information from the IMU's gyroscope, accelerometer, and magnetometer to describe the device's orientation in 3D space) columns represent two 3D positional structures. It seems possible to create a graph based on this data and add temporal positional embeddings to represent the timesteps. We might can just ignore these two types of columns cuz we have already built two graphs that represent the structure information. \n\nSo here are two possible initial tasks for graph I come up with:\n* Node classification: classify gesture for each node (each timestep) and summarize the all the result with gbdts\n* Graph classification: directly summarize the graph to predict the gesture. \n\nIf it works, it's three straight compeititons (CIBMTR, BYU, and CMI) I use GNN to solve the problem.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4310004%2F6bfd923e76a9e97ddaec36f53bf7cce5%2F123.png?generation=1748659270426213&alt=media)",
      "votes": 13
    },
    {
      "id": 3253272,
      "postDate": "2025-07-24T10:59:24.553Z",
      "content": "<p>Hi Tom, I love GNNs but I'm not completely on board with considering this a graph structure, at least not the two individual 3D structures. To me, these are 3D trajectories or paths. I can see that 3D path classification would be useful but I didn't think this is a GNN use-case?</p>\n<p>Are you suggesting an interconnected structure of the two paths in a shared space? I tried to draw this and I can see that this would be a graph that we could attempt to classify but I don't understand why this would be helpful.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8509053%2F20221e39e9949b0c619af92a1e8f04d9%2FScreenshot%202025-07-24%20115356.png?generation=1753354683842437&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "Hi Tom, I love GNNs but I'm not completely on board with considering this a graph structure, at least not the two individual 3D structures. To me, these are 3D trajectories or paths. I can see that 3D path classification would be useful but I didn't think this is a GNN use-case?\n\nAre you suggesting an interconnected structure of the two paths in a shared space? I tried to draw this and I can see that this would be a graph that we could attempt to classify but I don't understand why this would be helpful.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8509053%2F20221e39e9949b0c619af92a1e8f04d9%2FScreenshot%202025-07-24%20115356.png?generation=1753354683842437&alt=media)\n\n"
    },
    {
      "id": 3239658,
      "postDate": "2025-07-03T03:06:18.687Z",
      "content": "<p>Hello Tom,</p>\n<p>I have a question regarding this interesting approach. Is it possible to use \"torch_geometric\" without any issues?<br>\nOn my side, I’ve encountered some difficulties with it.</p>\n<p>Thank you in advance for your feedback.</p>",
      "rawMarkdown": "Hello Tom,\n\nI have a question regarding this interesting approach. Is it possible to use \"torch_geometric\" without any issues?\nOn my side, I’ve encountered some difficulties with it.\n\nThank you in advance for your feedback.",
      "replies": [
        {
          "id": 3240943,
          "postDate": "2025-07-04T11:16:32.750Z",
          "content": "<p><a href=\"https://www.kaggle.com/djamilabenchikh\" target=\"_blank\">@djamilabenchikh</a> hi, what difficulties you encountered? </p>",
          "rawMarkdown": "@djamilabenchikh hi, what difficulties you encountered? ",
          "replies": [
            {
              "id": 3243328,
              "postDate": "2025-07-07T03:40:14.140Z",
              "content": "<p>Hi Tom , I encountered the following error while running my notebook:<br>\n    - ModuleNotFoundError: No module named 'torch_geometric'</p>\n<p>It seems that the issue is due to the torch_geometric module, which is used for Graph Neural Networks (GNNs), not being preinstalled in the execution environment. And since dynamic installation of external packages is not allowed in submission notebooks (due to the lack of internet access), I was wondering if you had found a workaround or an alternative to overcome this limitation?</p>",
              "rawMarkdown": "Hi Tom , I encountered the following error while running my notebook:\n    - ModuleNotFoundError: No module named 'torch_geometric'\n\nIt seems that the issue is due to the torch_geometric module, which is used for Graph Neural Networks (GNNs), not being preinstalled in the execution environment. And since dynamic installation of external packages is not allowed in submission notebooks (due to the lack of internet access), I was wondering if you had found a workaround or an alternative to overcome this limitation?\n"
            },
            {
              "id": 3251640,
              "postDate": "2025-07-21T09:41:12.997Z",
              "content": "<p><a href=\"https://www.kaggle.com/djamilabenchikh\" target=\"_blank\">@djamilabenchikh</a> first you should install pyg in your notebook. This can be achieved by preparing whl files and install them without internet.</p>",
              "rawMarkdown": "@djamilabenchikh first you should install pyg in your notebook. This can be achieved by preparing whl files and install them without internet."
            }
          ]
        }
      ]
    },
    {
      "id": 3215901,
      "postDate": "2025-06-02T19:56:53.103Z",
      "content": "<p>Goodness, Tom, I love your Graph spirit. I freaking love your work 😂</p>\n<p>So your idea is to take all these points and create a graph and node classification model. How does that translate to inference exactly? By just putting the test instances in the graph in the first place?</p>",
      "rawMarkdown": "Goodness, Tom, I love your Graph spirit. I freaking love your work 😂\n\nSo your idea is to take all these points and create a graph and node classification model. How does that translate to inference exactly? By just putting the test instances in the graph in the first place?",
      "replies": [
        {
          "id": 3216174,
          "postDate": "2025-06-03T07:39:34.120Z",
          "content": "<p><a href=\"https://www.kaggle.com/andrewjdarley\" target=\"_blank\">@andrewjdarley</a> because we must inference on new graph, we cannot use transductive gnn, so the only option is GraphSage again. I think image is also a good approach. I'll try them both. Hope I can keep gold in BYU, that can build much confidence for me 🙏 </p>",
          "rawMarkdown": "@andrewjdarley because we must inference on new graph, we cannot use transductive gnn, so the only option is GraphSage again. I think image is also a good approach. I'll try them both. Hope I can keep gold in BYU, that can build much confidence for me 🙏 "
        }
      ]
    },
    {
      "id": 3214155,
      "postDate": "2025-05-31T03:31:43.033Z",
      "rawMarkdown": "",
      "votes": -4,
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 3253272,
      "author_name": "Peter Moorhouse",
      "author_url": "",
      "post_date": "2025-07-24T10:59:24.553000",
      "content": "<p>Hi Tom, I love GNNs but I'm not completely on board with considering this a graph structure, at least not the two individual 3D structures. To me, these are 3D trajectories or paths. I can see that 3D path classification would be useful but I didn't think this is a GNN use-case?</p>\n<p>Are you suggesting an interconnected structure of the two paths in a shared space? I tried to draw this and I can see that this would be a graph that we could attempt to classify but I don't understand why this would be helpful.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8509053%2F20221e39e9949b0c619af92a1e8f04d9%2FScreenshot%202025-07-24%20115356.png?generation=1753354683842437&amp;alt=media\" alt=\"\"></p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 3239658,
      "author_name": "Djami La",
      "author_url": "",
      "post_date": "2025-07-03T03:06:18.687000",
      "content": "<p>Hello Tom,</p>\n<p>I have a question regarding this interesting approach. Is it possible to use \"torch_geometric\" without any issues?<br>\nOn my side, I’ve encountered some difficulties with it.</p>\n<p>Thank you in advance for your feedback.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 3240943,
          "author_name": "Tom",
          "author_url": "",
          "post_date": "2025-07-04T11:16:32.750000",
          "content": "<p><a href=\"https://www.kaggle.com/djamilabenchikh\" target=\"_blank\">@djamilabenchikh</a> hi, what difficulties you encountered? </p>",
          "votes": 0,
          "replies": [
            {
              "id": 3243328,
              "author_name": "Djami La",
              "author_url": "",
              "post_date": "2025-07-07T03:40:14.140000",
              "content": "<p>Hi Tom , I encountered the following error while running my notebook:<br>\n    - ModuleNotFoundError: No module named 'torch_geometric'</p>\n<p>It seems that the issue is due to the torch_geometric module, which is used for Graph Neural Networks (GNNs), not being preinstalled in the execution environment. And since dynamic installation of external packages is not allowed in submission notebooks (due to the lack of internet access), I was wondering if you had found a workaround or an alternative to overcome this limitation?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 3251640,
              "author_name": "Tom",
              "author_url": "",
              "post_date": "2025-07-21T09:41:12.997000",
              "content": "<p><a href=\"https://www.kaggle.com/djamilabenchikh\" target=\"_blank\">@djamilabenchikh</a> first you should install pyg in your notebook. This can be achieved by preparing whl files and install them without internet.</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3215901,
      "author_name": "Andrew Darley",
      "author_url": "",
      "post_date": "2025-06-02T19:56:53.103000",
      "content": "<p>Goodness, Tom, I love your Graph spirit. I freaking love your work 😂</p>\n<p>So your idea is to take all these points and create a graph and node classification model. How does that translate to inference exactly? By just putting the test instances in the graph in the first place?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 3216174,
          "author_name": "Tom",
          "author_url": "",
          "post_date": "2025-06-03T07:39:34.120000",
          "content": "<p><a href=\"https://www.kaggle.com/andrewjdarley\" target=\"_blank\">@andrewjdarley</a> because we must inference on new graph, we cannot use transductive gnn, so the only option is GraphSage again. I think image is also a good approach. I'll try them both. Hope I can keep gold in BYU, that can build much confidence for me 🙏 </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 3214155,
      "author_name": "",
      "author_url": "",
      "post_date": "2025-05-31T03:31:43.033000",
      "content": "",
      "votes": -4,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3214137": "I observe that the `acc` (Linear acceleration along three axes) and `rot` (Orientation data which combines information from the IMU's gyroscope, accelerometer, and magnetometer to describe the device's orientation in 3D space) columns represent two 3D positional structures. It seems possible to create a graph based on this data and add temporal positional embeddings to represent the timesteps. We might can just ignore these two types of columns cuz we have already built two graphs that represent the structure information. \n\nSo here are two possible initial tasks for graph I come up with:\n* Node classification: classify gesture for each node (each timestep) and summarize the all the result with gbdts\n* Graph classification: directly summarize the graph to predict the gesture. \n\nIf it works, it's three straight compeititons (CIBMTR, BYU, and CMI) I use GNN to solve the problem.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4310004%2F6bfd923e76a9e97ddaec36f53bf7cce5%2F123.png?generation=1748659270426213&alt=media)",
    "3253272": "Hi Tom, I love GNNs but I'm not completely on board with considering this a graph structure, at least not the two individual 3D structures. To me, these are 3D trajectories or paths. I can see that 3D path classification would be useful but I didn't think this is a GNN use-case?\n\nAre you suggesting an interconnected structure of the two paths in a shared space? I tried to draw this and I can see that this would be a graph that we could attempt to classify but I don't understand why this would be helpful.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8509053%2F20221e39e9949b0c619af92a1e8f04d9%2FScreenshot%202025-07-24%20115356.png?generation=1753354683842437&alt=media)\n\n",
    "3239658": "Hello Tom,\n\nI have a question regarding this interesting approach. Is it possible to use \"torch_geometric\" without any issues?\nOn my side, I’ve encountered some difficulties with it.\n\nThank you in advance for your feedback.",
    "3215901": "Goodness, Tom, I love your Graph spirit. I freaking love your work 😂\n\nSo your idea is to take all these points and create a graph and node classification model. How does that translate to inference exactly? By just putting the test instances in the graph in the first place?",
    "3214155": ""
  }
}