{
  "id": 594029,
  "title": "Question about Flights & Segments Hierarchy in JSON Data",
  "url": "/competitions/aeroclub-recsys-2025/discussion/594029",
  "author_name": "",
  "post_date": "2025-08-01T05:04:23.638566300Z",
  "votes": 1,
  "comment_count": 3,
  "views": 0,
  "content": "<p>I'm looking at the JSON structure, particularly the flights and segments fields. It seems like some ranker_id entries have multiple legs, and others have a single leg with multiple segments. Can the organizers or anyone who has explored this data confirm if there are any key details about how to correctly handle the hierarchy and dependencies between these nested structures for feature engineering?</p>",
  "messages": [
    {
      "id": "3259217",
      "postDate": "08/01/2025 05:04:23",
      "content": "<p>I'm looking at the JSON structure, particularly the flights and segments fields. It seems like some ranker_id entries have multiple legs, and others have a single leg with multiple segments. Can the organizers or anyone who has explored this data confirm if there are any key details about how to correctly handle the hierarchy and dependencies between these nested structures for feature engineering?</p>",
      "rawMarkdown": "I'm looking at the JSON structure, particularly the flights and segments fields. It seems like some ranker_id entries have multiple legs, and others have a single leg with multiple segments. Can the organizers or anyone who has explored this data confirm if there are any key details about how to correctly handle the hierarchy and dependencies between these nested structures for feature engineering?",
      "votes": null
    },
    {
      "id": "3259222",
      "postDate": "08/01/2025 05:24:18",
      "content": "<p>Thanks for your question <a href=\"https://www.kaggle.com/ahmedali30\" target=\"_blank\">@ahmedali30</a>.</p>\n<p>Each flight leg (legs0/legs1) can consist of multiple segments (segments0-3) when there are connections. </p>\n<p>Please full <a href=\"https://www.kaggle.com/competitions/aeroclub-recsys-2025/data\" target=\"_blank\">description in the data tab</a>. If something not clear enough let me know and I'll describe it more precisely. </p>",
      "rawMarkdown": "Thanks for your question @ahmedali30.\n\nEach flight leg (legs0/legs1) can consist of multiple segments (segments0-3) when there are connections. \n\nPlease full [description in the data tab](https://www.kaggle.com/competitions/aeroclub-recsys-2025/data ). If something not clear enough let me know and I'll describe it more precisely.",
      "votes": null
    },
    {
      "id": "3259228",
      "postDate": "08/01/2025 05:31:15",
      "content": "<p>Thanks for the quick response <a href=\"https://www.kaggle.com/samvelkoch\" target=\"_blank\">@samvelkoch</a> ! That confirms our understanding of the hierarchy.</p>\n<p>To follow up, what would be the recommended approach for handling a trip with multiple legs (e.g., legs0 and legs1)? For example, should we:<br>\na) Create a single row for the entire trip, aggregating features from all legs and segments?<br>\nb) Create a separate row for each leg of the trip, with the ranker_id duplicated?</p>\n<p>We're looking for the best way to represent this in a flat table for our model. Any guidance on this would be very helpful.</p>",
      "rawMarkdown": "Thanks for the quick response @samvelkoch ! That confirms our understanding of the hierarchy.\n\nTo follow up, what would be the recommended approach for handling a trip with multiple legs (e.g., legs0 and legs1)? For example, should we:\na) Create a single row for the entire trip, aggregating features from all legs and segments?\nb) Create a separate row for each leg of the trip, with the ranker_id duplicated?\n\nWe're looking for the best way to represent this in a flat table for our model. Any guidance on this would be very helpful.",
      "votes": null
    },
    {
      "id": "3259244",
      "postDate": "08/01/2025 06:28:41",
      "content": "<p>Why not try both? 😉</p>",
      "rawMarkdown": "Why not try both? 😉",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3259222,
      "author_name": "samvelkoch",
      "author_url": "",
      "post_date": "08/01/2025 05:24:18",
      "content": "<p>Thanks for your question <a href=\"https://www.kaggle.com/ahmedali30\" target=\"_blank\">@ahmedali30</a>.</p>\n<p>Each flight leg (legs0/legs1) can consist of multiple segments (segments0-3) when there are connections. </p>\n<p>Please full <a href=\"https://www.kaggle.com/competitions/aeroclub-recsys-2025/data\" target=\"_blank\">description in the data tab</a>. If something not clear enough let me know and I'll describe it more precisely. </p>",
      "votes": null,
      "replies": [
        {
          "id": 3259228,
          "author_name": "ahmedali30",
          "author_url": "",
          "post_date": "08/01/2025 05:31:15",
          "content": "<p>Thanks for the quick response <a href=\"https://www.kaggle.com/samvelkoch\" target=\"_blank\">@samvelkoch</a> ! That confirms our understanding of the hierarchy.</p>\n<p>To follow up, what would be the recommended approach for handling a trip with multiple legs (e.g., legs0 and legs1)? For example, should we:<br>\na) Create a single row for the entire trip, aggregating features from all legs and segments?<br>\nb) Create a separate row for each leg of the trip, with the ranker_id duplicated?</p>\n<p>We're looking for the best way to represent this in a flat table for our model. Any guidance on this would be very helpful.</p>",
          "votes": null,
          "replies": [
            {
              "id": 3259244,
              "author_name": "samvelkoch",
              "author_url": "",
              "post_date": "08/01/2025 06:28:41",
              "content": "<p>Why not try both? 😉</p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3259217": "I'm looking at the JSON structure, particularly the flights and segments fields. It seems like some ranker_id entries have multiple legs, and others have a single leg with multiple segments. Can the organizers or anyone who has explored this data confirm if there are any key details about how to correctly handle the hierarchy and dependencies between these nested structures for feature engineering?",
    "3259222": "Thanks for your question @ahmedali30.\n\nEach flight leg (legs0/legs1) can consist of multiple segments (segments0-3) when there are connections. \n\nPlease full [description in the data tab](https://www.kaggle.com/competitions/aeroclub-recsys-2025/data ). If something not clear enough let me know and I'll describe it more precisely.",
    "3259228": "Thanks for the quick response @samvelkoch ! That confirms our understanding of the hierarchy.\n\nTo follow up, what would be the recommended approach for handling a trip with multiple legs (e.g., legs0 and legs1)? For example, should we:\na) Create a single row for the entire trip, aggregating features from all legs and segments?\nb) Create a separate row for each leg of the trip, with the ranker_id duplicated?\n\nWe're looking for the best way to represent this in a flat table for our model. Any guidance on this would be very helpful.",
    "3259244": "Why not try both? 😉"
  },
  "source": "meta"
}