{
  "id": 398601,
  "title": "Log scale charts",
  "url": "/competitions/benetech-making-graphs-accessible/discussion/398601",
  "author_name": "",
  "post_date": "2023-03-30T20:44:08.158255200Z",
  "votes": 13,
  "comment_count": 3,
  "views": 0,
  "content": "<p>An example training chart where both the x-axis and y-axis have logarithmic scales: '039d3e82ebaf.jpg' The image is below with an added green rectangle to highlight a point plus coordinate axes added around the image for pixel numbers (created with OpenCV/matplotlib).<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1708071%2F20e89c79f294d6abd021778084095b68%2Flog_scale.png?generation=1680208071099507&amp;alt=media\" alt=\"\"></p>\n<p>Consider the point with the green rectangle added around it.  That point clearly has the fifth largest y-value.  Looking at the annotation file that means the ground truth for the point is x=114, y=23.  Looking at a numpy array for the image it can be checked that the center of the green point has pixel coordinates of pixel_x=281, pixel_y=198.  Also, in the image the tick marks on the y-axis tell us y=100 is pixel_y=42, y=10 is pixel_y=224, and y=1 is pixel_y=406.  The tick marks and using a log-scale give us a formula of pixel_y = 406 - 182<em>log_10(y).  That means the green point (or any point with y=23) should have pixel_y = 406 - 182</em>log_10(23) = 158.2.</p>\n<p>What seems to be happening in the ground truth is the use of a linear scale.  Looking between 10 and 100 the linear pixel_y formula would be pixel_y = 224 - 182/90 * (y-10).  That means for a point with y=23 we get pixel_y = 224-182/90 * (23-10) = 197.7.  The lowest point (x=132, y=3) also seems to be linear, but with a different formula extrapolated from the y-values of 1 and 10.</p>",
  "messages": [
    {
      "id": "2203474",
      "postDate": "03/30/2023 20:44:08",
      "content": "<p>An example training chart where both the x-axis and y-axis have logarithmic scales: '039d3e82ebaf.jpg' The image is below with an added green rectangle to highlight a point plus coordinate axes added around the image for pixel numbers (created with OpenCV/matplotlib).<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1708071%2F20e89c79f294d6abd021778084095b68%2Flog_scale.png?generation=1680208071099507&amp;alt=media\" alt=\"\"></p>\n<p>Consider the point with the green rectangle added around it.  That point clearly has the fifth largest y-value.  Looking at the annotation file that means the ground truth for the point is x=114, y=23.  Looking at a numpy array for the image it can be checked that the center of the green point has pixel coordinates of pixel_x=281, pixel_y=198.  Also, in the image the tick marks on the y-axis tell us y=100 is pixel_y=42, y=10 is pixel_y=224, and y=1 is pixel_y=406.  The tick marks and using a log-scale give us a formula of pixel_y = 406 - 182<em>log_10(y).  That means the green point (or any point with y=23) should have pixel_y = 406 - 182</em>log_10(23) = 158.2.</p>\n<p>What seems to be happening in the ground truth is the use of a linear scale.  Looking between 10 and 100 the linear pixel_y formula would be pixel_y = 224 - 182/90 * (y-10).  That means for a point with y=23 we get pixel_y = 224-182/90 * (23-10) = 197.7.  The lowest point (x=132, y=3) also seems to be linear, but with a different formula extrapolated from the y-values of 1 and 10.</p>",
      "rawMarkdown": "An example training chart where both the x-axis and y-axis have logarithmic scales: '039d3e82ebaf.jpg' The image is below with an added green rectangle to highlight a point plus coordinate axes added around the image for pixel numbers (created with OpenCV/matplotlib).\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1708071%2F20e89c79f294d6abd021778084095b68%2Flog_scale.png?generation=1680208071099507&alt=media)\n\nConsider the point with the green rectangle added around it.  That point clearly has the fifth largest y-value.  Looking at the annotation file that means the ground truth for the point is x=114, y=23.  Looking at a numpy array for the image it can be checked that the center of the green point has pixel coordinates of pixel_x=281, pixel_y=198.  Also, in the image the tick marks on the y-axis tell us y=100 is pixel_y=42, y=10 is pixel_y=224, and y=1 is pixel_y=406.  The tick marks and using a log-scale give us a formula of pixel_y = 406 - 182*log_10(y).  That means the green point (or any point with y=23) should have pixel_y = 406 - 182*log_10(23) = 158.2.\n\nWhat seems to be happening in the ground truth is the use of a linear scale.  Looking between 10 and 100 the linear pixel_y formula would be pixel_y = 224 - 182/90 * (y-10).  That means for a point with y=23 we get pixel_y = 224-182/90 * (23-10) = 197.7.  The lowest point (x=132, y=3) also seems to be linear, but with a different formula extrapolated from the y-values of 1 and 10.",
      "votes": null
    },
    {
      "id": "2203503",
      "postDate": "03/30/2023 21:23:46",
      "content": "<p>good work👌👌👌👍</p>",
      "rawMarkdown": "good work👌👌👌👍",
      "votes": null
    },
    {
      "id": "2225799",
      "postDate": "04/18/2023 12:52:34",
      "content": "<p>So in otherwords there's a bug in the scoring!?!</p>",
      "rawMarkdown": "So in otherwords there's a bug in the scoring!?!",
      "votes": null
    },
    {
      "id": "2225842",
      "postDate": "04/18/2023 13:24:55",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/pabyrnes\" target=\"_blank\">@pabyrnes</a>, Thanks for the heads up. The inclusion of a log-scale plot in was a mistake. We reviewed the data however, and it appears this is the only instance of one -- there are no log-scale plots in the test set. You can ignore the <code>039d3e82ebaf</code> image.</p>",
      "rawMarkdown": "Hi @pabyrnes, Thanks for the heads up. The inclusion of a log-scale plot in was a mistake. We reviewed the data however, and it appears this is the only instance of one -- there are no log-scale plots in the test set. You can ignore the `039d3e82ebaf` image.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2203503,
      "author_name": "smnuruzzaman",
      "author_url": "",
      "post_date": "03/30/2023 21:23:46",
      "content": "<p>good work👌👌👌👍</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2225799,
      "author_name": "nigelhenry",
      "author_url": "",
      "post_date": "04/18/2023 12:52:34",
      "content": "<p>So in otherwords there's a bug in the scoring!?!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2225842,
      "author_name": "ryanholbrook",
      "author_url": "",
      "post_date": "04/18/2023 13:24:55",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/pabyrnes\" target=\"_blank\">@pabyrnes</a>, Thanks for the heads up. The inclusion of a log-scale plot in was a mistake. We reviewed the data however, and it appears this is the only instance of one -- there are no log-scale plots in the test set. You can ignore the <code>039d3e82ebaf</code> image.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2203474": "An example training chart where both the x-axis and y-axis have logarithmic scales: '039d3e82ebaf.jpg' The image is below with an added green rectangle to highlight a point plus coordinate axes added around the image for pixel numbers (created with OpenCV/matplotlib).\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1708071%2F20e89c79f294d6abd021778084095b68%2Flog_scale.png?generation=1680208071099507&alt=media)\n\nConsider the point with the green rectangle added around it.  That point clearly has the fifth largest y-value.  Looking at the annotation file that means the ground truth for the point is x=114, y=23.  Looking at a numpy array for the image it can be checked that the center of the green point has pixel coordinates of pixel_x=281, pixel_y=198.  Also, in the image the tick marks on the y-axis tell us y=100 is pixel_y=42, y=10 is pixel_y=224, and y=1 is pixel_y=406.  The tick marks and using a log-scale give us a formula of pixel_y = 406 - 182*log_10(y).  That means the green point (or any point with y=23) should have pixel_y = 406 - 182*log_10(23) = 158.2.\n\nWhat seems to be happening in the ground truth is the use of a linear scale.  Looking between 10 and 100 the linear pixel_y formula would be pixel_y = 224 - 182/90 * (y-10).  That means for a point with y=23 we get pixel_y = 224-182/90 * (23-10) = 197.7.  The lowest point (x=132, y=3) also seems to be linear, but with a different formula extrapolated from the y-values of 1 and 10.",
    "2203503": "good work👌👌👌👍",
    "2225799": "So in otherwords there's a bug in the scoring!?!",
    "2225842": "Hi @pabyrnes, Thanks for the heads up. The inclusion of a log-scale plot in was a mistake. We reviewed the data however, and it appears this is the only instance of one -- there are no log-scale plots in the test set. You can ignore the `039d3e82ebaf` image."
  },
  "source": "meta"
}