{
  "id": 356789,
  "title": "An important detail about the court",
  "url": "/competitions/tabular-playground-series-oct-2022/discussion/356789",
  "author_name": "",
  "post_date": "2022-10-01T23:32:19.505383400Z",
  "votes": 20,
  "comment_count": 9,
  "views": 0,
  "content": "<p>I saw a couple of great visualization like this one: <a href=\"https://www.kaggle.com/code/ivanrep/october-2022-tps-eda/notebook\" target=\"_blank\">https://www.kaggle.com/code/ivanrep/october-2022-tps-eda/notebook</a> making a mistake interpreting the axis of the court (fixed from version 7). <br>\nIf we plot the trajectory of the ball in game_num=1, event_id=1002 filtering by the event_time that in the next 10s which one of the teams has scored, we observe that the last point is on the line y=-120.<br>\n <img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2F86d2547937b6d063f3d65dca51b9183a%2Fdownload1.png?generation=1664666848714186&amp;alt=media\" alt=\"\"><br>\nIf we repeat this with other events, we observe that the same thing happens (y=120 / y=-120):</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2F8e9ea43e6450d18ab9e6862f59928fd0%2Fdownload2.png?generation=1664666860777196&amp;alt=media\" alt=\"\"><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2F34fb4f0e5b02a1cc9d46af00aeec9255%2Fdownload3.png?generation=1664666872021044&amp;alt=media\" alt=\"\"><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2Fcfc6636bf6ed6a5cbb475784a0a896fc%2Fdownload.png?generation=1664666988329599&amp;alt=media\" alt=\"\"></p>\n<p>What does this mean? <br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2Fe5294be952deabc6e74b3fce93dc811b%2Finbox_4696479_dd81bdc323e7fc146262b2272a35202f_WORNG.png?generation=1666104058035456&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2Fc3be82731e4ba106e0faf8921784cf0a%2Finbox_981311_52acb29e8835b9248bc9b05f3170e9b1_2022-10-17-15-51-52-image.png?generation=1666104081770252&amp;alt=media\" alt=\"\"></p>",
  "messages": [
    {
      "id": "1966382",
      "postDate": "10/01/2022 23:32:19",
      "content": "<p>I saw a couple of great visualization like this one: <a href=\"https://www.kaggle.com/code/ivanrep/october-2022-tps-eda/notebook\" target=\"_blank\">https://www.kaggle.com/code/ivanrep/october-2022-tps-eda/notebook</a> making a mistake interpreting the axis of the court (fixed from version 7). <br>\nIf we plot the trajectory of the ball in game_num=1, event_id=1002 filtering by the event_time that in the next 10s which one of the teams has scored, we observe that the last point is on the line y=-120.<br>\n <img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2F86d2547937b6d063f3d65dca51b9183a%2Fdownload1.png?generation=1664666848714186&amp;alt=media\" alt=\"\"><br>\nIf we repeat this with other events, we observe that the same thing happens (y=120 / y=-120):</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2F8e9ea43e6450d18ab9e6862f59928fd0%2Fdownload2.png?generation=1664666860777196&amp;alt=media\" alt=\"\"><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2F34fb4f0e5b02a1cc9d46af00aeec9255%2Fdownload3.png?generation=1664666872021044&amp;alt=media\" alt=\"\"><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2Fcfc6636bf6ed6a5cbb475784a0a896fc%2Fdownload.png?generation=1664666988329599&amp;alt=media\" alt=\"\"></p>\n<p>What does this mean? <br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2Fe5294be952deabc6e74b3fce93dc811b%2Finbox_4696479_dd81bdc323e7fc146262b2272a35202f_WORNG.png?generation=1666104058035456&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2Fc3be82731e4ba106e0faf8921784cf0a%2Finbox_981311_52acb29e8835b9248bc9b05f3170e9b1_2022-10-17-15-51-52-image.png?generation=1666104081770252&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "I saw a couple of great visualization like this one: https://www.kaggle.com/code/ivanrep/october-2022-tps-eda/notebook making a mistake interpreting the axis of the court (fixed from version 7). \nIf we plot the trajectory of the ball in game_num=1, event_id=1002 filtering by the event_time that in the next 10s which one of the teams has scored, we observe that the last point is on the line y=-120.\n ![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2F86d2547937b6d063f3d65dca51b9183a%2Fdownload1.png?generation=1664666848714186&alt=media)\nIf we repeat this with other events, we observe that the same thing happens (y=120 / y=-120):\n  \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2F8e9ea43e6450d18ab9e6862f59928fd0%2Fdownload2.png?generation=1664666860777196&alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2F34fb4f0e5b02a1cc9d46af00aeec9255%2Fdownload3.png?generation=1664666872021044&alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2Fcfc6636bf6ed6a5cbb475784a0a896fc%2Fdownload.png?generation=1664666988329599&alt=media)\n\nWhat does this mean? \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2Fe5294be952deabc6e74b3fce93dc811b%2Finbox_4696479_dd81bdc323e7fc146262b2272a35202f_WORNG.png?generation=1666104058035456&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2Fc3be82731e4ba106e0faf8921784cf0a%2Finbox_981311_52acb29e8835b9248bc9b05f3170e9b1_2022-10-17-15-51-52-image.png?generation=1666104081770252&alt=media)",
      "votes": null
    },
    {
      "id": "1966407",
      "postDate": "10/02/2022 00:42:13",
      "content": "<p>Thanks for noticing this. I'll make sure to redo this.</p>\n<p>Edit: Fixed!</p>",
      "rawMarkdown": "Thanks for noticing this. I'll make sure to redo this.\n\nEdit: Fixed!",
      "votes": null
    },
    {
      "id": "1966877",
      "postDate": "10/02/2022 07:48:11",
      "content": "<p>Thanks to you for these amazing visualisations</p>",
      "rawMarkdown": "Thanks to you for these amazing visualisations",
      "votes": null
    },
    {
      "id": "1967401",
      "postDate": "10/02/2022 13:35:46",
      "content": "<p><a href=\"https://www.kaggle.com/maherelouahabi\" target=\"_blank\">@maherelouahabi</a> there is nothing bad about transposing the field. it is not right or wrong, it is just a matter of taste. The important thing is to keep in mind a proper order of the coordinates when you inverse them. For example, <a href=\"https://www.kaggle.com/code/sergiosaharovskiy/tps-oct-2022-viz-players-positions-animated\" target=\"_blank\">I have explicitly pointed it out here.</a></p>",
      "rawMarkdown": "maherelouahabi there is nothing bad about transposing the field. it is not right or wrong, it is just a matter of taste. The important thing is to keep in mind a proper order of the coordinates when you inverse them. For example, [I have explicitly pointed it out here.](https://www.kaggle.com/code/sergiosaharovskiy/tps-oct-2022-viz-players-positions-animated)",
      "votes": null
    },
    {
      "id": "1967472",
      "postDate": "10/02/2022 14:18:47",
      "content": "<p>Nice Work!!</p>",
      "rawMarkdown": "Nice Work!!",
      "votes": null
    },
    {
      "id": "1967514",
      "postDate": "10/02/2022 14:52:20",
      "content": "<p>The problem is that it is not a transposition of the field. It is a transposition of the goals leaving the rest untransposed. This causes all the relative distances to the goal to be incorrect.</p>",
      "rawMarkdown": "The problem is that it is not a transposition of the field. It is a transposition of the goals leaving the rest untransposed. This causes all the relative distances to the goal to be incorrect.",
      "votes": null
    },
    {
      "id": "1967589",
      "postDate": "10/02/2022 15:36:45",
      "content": "<p>Lets say you have min X -82.5 and max X +82.5 and -121 Y, +121 Y respectively. You change them places and apply the same logic for the ball.  It should not impact the visualization. Are you pointing out the specific work/s (notebook/s)?</p>",
      "rawMarkdown": "Lets say you have min X -82.5 and max X +82.5 and -121 Y, +121 Y respectively. You change them places and apply the same logic for the ball.  It should not impact the visualization. Are you pointing out the specific work/s (notebook/s)?",
      "votes": null
    },
    {
      "id": "1967617",
      "postDate": "10/02/2022 15:47:24",
      "content": "<p>I totally agree with you. The key in what you said is 'apply the same logic for the ball'. NBs that I have observed, this logic wasn't extrapolated to the other coordinates such as the ball or the players. I thought it was important to point this out</p>",
      "rawMarkdown": "I totally agree with you. The key in what you said is 'apply the same logic for the ball'. NBs that I have observed, this logic wasn't extrapolated to the other coordinates such as the ball or the players. I thought it was important to point this out",
      "votes": null
    },
    {
      "id": "1993607",
      "postDate": "10/18/2022 14:08:19",
      "content": "<p>Hello Maher, first and foremost, thanks you for share this detail about the court. 😃</p>\n<p>I wonder if according to what is shown in this code:</p>\n<pre><code>train.nlargest(1, 'ball_pos_x') #80.6875\ntrain.nsmallest(1, 'ball_pos_x') #-80.6250\ntrain.nlargest(1, 'ball_pos_y') #104.3125\ntrain.nsmallest(1, 'ball_pos_y')#-104.3125\n</code></pre>\n<p>This image fits better to what the X and Y axes indicate 😃</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F981311%2F52acb29e8835b9248bc9b05f3170e9b1%2F2022-10-17-15-51-52-image.png?generation=1666101937085772&amp;alt=media\" alt=\"\"></p>\n<p>Kind Regards,</p>\n<p>D.</p>",
      "rawMarkdown": "Hello Maher, first and foremost, thanks you for share this detail about the court. 😃\n\nI wonder if according to what is shown in this code:\n```\ntrain.nlargest(1, 'ball_pos_x') #80.6875\ntrain.nsmallest(1, 'ball_pos_x') #-80.6250\ntrain.nlargest(1, 'ball_pos_y') #104.3125\ntrain.nsmallest(1, 'ball_pos_y')#-104.3125\n```\n\nThis image fits better to what the X and Y axes indicate 😃\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F981311%2F52acb29e8835b9248bc9b05f3170e9b1%2F2022-10-17-15-51-52-image.png?generation=1666101937085772&alt=media)\n\nKind Regards,\n\nD.",
      "votes": null
    },
    {
      "id": "1993623",
      "postDate": "10/18/2022 14:32:38",
      "content": "<p>Dear <a href=\"https://www.kaggle.com/davidhguerrero\" target=\"_blank\">@davidhguerrero</a> </p>\n<p>You are absolutely right. I was so blinded by showing the location of the goals that I misplaced the axes. Thank you for your correction. I will fix it.</p>\n<p>Un saludo<br>\nMaher</p>",
      "rawMarkdown": "Dear @davidhguerrero \n\nYou are absolutely right. I was so blinded by showing the location of the goals that I misplaced the axes. Thank you for your correction. I will fix it.\n\nUn saludo\nMaher",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1966407,
      "author_name": "ivanrep",
      "author_url": "",
      "post_date": "10/02/2022 00:42:13",
      "content": "<p>Thanks for noticing this. I'll make sure to redo this.</p>\n<p>Edit: Fixed!</p>",
      "votes": null,
      "replies": [
        {
          "id": 1966877,
          "author_name": "maherelouahabi",
          "author_url": "",
          "post_date": "10/02/2022 07:48:11",
          "content": "<p>Thanks to you for these amazing visualisations</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1967401,
      "author_name": "sergiosaharovskiy",
      "author_url": "",
      "post_date": "10/02/2022 13:35:46",
      "content": "<p><a href=\"https://www.kaggle.com/maherelouahabi\" target=\"_blank\">@maherelouahabi</a> there is nothing bad about transposing the field. it is not right or wrong, it is just a matter of taste. The important thing is to keep in mind a proper order of the coordinates when you inverse them. For example, <a href=\"https://www.kaggle.com/code/sergiosaharovskiy/tps-oct-2022-viz-players-positions-animated\" target=\"_blank\">I have explicitly pointed it out here.</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 1967514,
          "author_name": "maherelouahabi",
          "author_url": "",
          "post_date": "10/02/2022 14:52:20",
          "content": "<p>The problem is that it is not a transposition of the field. It is a transposition of the goals leaving the rest untransposed. This causes all the relative distances to the goal to be incorrect.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1967589,
          "author_name": "sergiosaharovskiy",
          "author_url": "",
          "post_date": "10/02/2022 15:36:45",
          "content": "<p>Lets say you have min X -82.5 and max X +82.5 and -121 Y, +121 Y respectively. You change them places and apply the same logic for the ball.  It should not impact the visualization. Are you pointing out the specific work/s (notebook/s)?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1967617,
          "author_name": "maherelouahabi",
          "author_url": "",
          "post_date": "10/02/2022 15:47:24",
          "content": "<p>I totally agree with you. The key in what you said is 'apply the same logic for the ball'. NBs that I have observed, this logic wasn't extrapolated to the other coordinates such as the ball or the players. I thought it was important to point this out</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1967472,
      "author_name": "aavaigmalhotra",
      "author_url": "",
      "post_date": "10/02/2022 14:18:47",
      "content": "<p>Nice Work!!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1993607,
      "author_name": "davidhguerrero",
      "author_url": "",
      "post_date": "10/18/2022 14:08:19",
      "content": "<p>Hello Maher, first and foremost, thanks you for share this detail about the court. 😃</p>\n<p>I wonder if according to what is shown in this code:</p>\n<pre><code>train.nlargest(1, 'ball_pos_x') #80.6875\ntrain.nsmallest(1, 'ball_pos_x') #-80.6250\ntrain.nlargest(1, 'ball_pos_y') #104.3125\ntrain.nsmallest(1, 'ball_pos_y')#-104.3125\n</code></pre>\n<p>This image fits better to what the X and Y axes indicate 😃</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F981311%2F52acb29e8835b9248bc9b05f3170e9b1%2F2022-10-17-15-51-52-image.png?generation=1666101937085772&amp;alt=media\" alt=\"\"></p>\n<p>Kind Regards,</p>\n<p>D.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1993623,
          "author_name": "maherelouahabi",
          "author_url": "",
          "post_date": "10/18/2022 14:32:38",
          "content": "<p>Dear <a href=\"https://www.kaggle.com/davidhguerrero\" target=\"_blank\">@davidhguerrero</a> </p>\n<p>You are absolutely right. I was so blinded by showing the location of the goals that I misplaced the axes. Thank you for your correction. I will fix it.</p>\n<p>Un saludo<br>\nMaher</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1966382": "I saw a couple of great visualization like this one: https://www.kaggle.com/code/ivanrep/october-2022-tps-eda/notebook making a mistake interpreting the axis of the court (fixed from version 7). \nIf we plot the trajectory of the ball in game_num=1, event_id=1002 filtering by the event_time that in the next 10s which one of the teams has scored, we observe that the last point is on the line y=-120.\n ![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2F86d2547937b6d063f3d65dca51b9183a%2Fdownload1.png?generation=1664666848714186&alt=media)\nIf we repeat this with other events, we observe that the same thing happens (y=120 / y=-120):\n  \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2F8e9ea43e6450d18ab9e6862f59928fd0%2Fdownload2.png?generation=1664666860777196&alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2F34fb4f0e5b02a1cc9d46af00aeec9255%2Fdownload3.png?generation=1664666872021044&alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2Fcfc6636bf6ed6a5cbb475784a0a896fc%2Fdownload.png?generation=1664666988329599&alt=media)\n\nWhat does this mean? \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2Fe5294be952deabc6e74b3fce93dc811b%2Finbox_4696479_dd81bdc323e7fc146262b2272a35202f_WORNG.png?generation=1666104058035456&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4696479%2Fc3be82731e4ba106e0faf8921784cf0a%2Finbox_981311_52acb29e8835b9248bc9b05f3170e9b1_2022-10-17-15-51-52-image.png?generation=1666104081770252&alt=media)",
    "1966407": "Thanks for noticing this. I'll make sure to redo this.\n\nEdit: Fixed!",
    "1966877": "Thanks to you for these amazing visualisations",
    "1967401": "maherelouahabi there is nothing bad about transposing the field. it is not right or wrong, it is just a matter of taste. The important thing is to keep in mind a proper order of the coordinates when you inverse them. For example, [I have explicitly pointed it out here.](https://www.kaggle.com/code/sergiosaharovskiy/tps-oct-2022-viz-players-positions-animated)",
    "1967472": "Nice Work!!",
    "1967514": "The problem is that it is not a transposition of the field. It is a transposition of the goals leaving the rest untransposed. This causes all the relative distances to the goal to be incorrect.",
    "1967589": "Lets say you have min X -82.5 and max X +82.5 and -121 Y, +121 Y respectively. You change them places and apply the same logic for the ball.  It should not impact the visualization. Are you pointing out the specific work/s (notebook/s)?",
    "1967617": "I totally agree with you. The key in what you said is 'apply the same logic for the ball'. NBs that I have observed, this logic wasn't extrapolated to the other coordinates such as the ball or the players. I thought it was important to point this out",
    "1993607": "Hello Maher, first and foremost, thanks you for share this detail about the court. 😃\n\nI wonder if according to what is shown in this code:\n```\ntrain.nlargest(1, 'ball_pos_x') #80.6875\ntrain.nsmallest(1, 'ball_pos_x') #-80.6250\ntrain.nlargest(1, 'ball_pos_y') #104.3125\ntrain.nsmallest(1, 'ball_pos_y')#-104.3125\n```\n\nThis image fits better to what the X and Y axes indicate 😃\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F981311%2F52acb29e8835b9248bc9b05f3170e9b1%2F2022-10-17-15-51-52-image.png?generation=1666101937085772&alt=media)\n\nKind Regards,\n\nD.",
    "1993623": "Dear @davidhguerrero \n\nYou are absolutely right. I was so blinded by showing the location of the goals that I misplaced the axes. Thank you for your correction. I will fix it.\n\nUn saludo\nMaher"
  },
  "source": "meta"
}