{
  "id": 397636,
  "title": "Does order of series predictions matter in scoring?",
  "url": "/competitions/benetech-making-graphs-accessible/discussion/397636",
  "author_name": "",
  "post_date": "2023-03-26T14:16:55.258128Z",
  "votes": 6,
  "comment_count": 6,
  "views": 0,
  "content": "<p>An example of where this would be a concern would be a scatter plot with points at (1, 1), (1, 2), (2,1), (2, 2). Consider the following predictions which are just a reordering of the points:</p>\n<ul>\n<li>x-series of [1, 1, 2, 2] and y-series of [1, 2, 1, 2]</li>\n<li>x-series of [1, 1, 2, 2] and y-series of [2, 1, 2, 1]</li>\n</ul>\n<p>Do these predictions get the same score?  Is there some criteria we are supposed to use to determine the desired order?</p>\n<p>For many charts there is a natural order, but this is not necessarily true for scatter plots.</p>",
  "messages": [
    {
      "id": "2197885",
      "postDate": "03/26/2023 14:16:55",
      "content": "<p>An example of where this would be a concern would be a scatter plot with points at (1, 1), (1, 2), (2,1), (2, 2). Consider the following predictions which are just a reordering of the points:</p>\n<ul>\n<li>x-series of [1, 1, 2, 2] and y-series of [1, 2, 1, 2]</li>\n<li>x-series of [1, 1, 2, 2] and y-series of [2, 1, 2, 1]</li>\n</ul>\n<p>Do these predictions get the same score?  Is there some criteria we are supposed to use to determine the desired order?</p>\n<p>For many charts there is a natural order, but this is not necessarily true for scatter plots.</p>",
      "rawMarkdown": "An example of where this would be a concern would be a scatter plot with points at (1, 1), (1, 2), (2,1), (2, 2). Consider the following predictions which are just a reordering of the points:\n- x-series of [1, 1, 2, 2] and y-series of [1, 2, 1, 2]\n- x-series of [1, 1, 2, 2] and y-series of [2, 1, 2, 1]\n\nDo these predictions get the same score?  Is there some criteria we are supposed to use to determine the desired order?\n\nFor many charts there is a natural order, but this is not necessarily true for scatter plots.",
      "votes": null
    },
    {
      "id": "2199099",
      "postDate": "03/27/2023 14:01:59",
      "content": "<p><a href=\"https://www.kaggle.com/pabyrnes\" target=\"_blank\">@pabyrnes</a> Great question. This wasn't addressed sufficiently in the documentation. Generally, you should take points from left to right on the x-axis with the corresponding y-values. For your scatter plot example, let me double check if there's an ambiguity possible. If so, I may need to make a data update.</p>",
      "rawMarkdown": "pabyrnes Great question. This wasn't addressed sufficiently in the documentation. Generally, you should take points from left to right on the x-axis with the corresponding y-values. For your scatter plot example, let me double check if there's an ambiguity possible. If so, I may need to make a data update.",
      "votes": null
    },
    {
      "id": "2203478",
      "postDate": "03/30/2023 20:47:30",
      "content": "<p>I noticed the ground truth for training annotation file 039d3e82ebaf.json does not list points from left to right (or from top-to-bottom).  The relevant part of the json is:<br>\n<code>\"data-series\": [{\"x\": 46, \"y\": 10}, {\"x\": 82, \"y\": 9}, {\"x\": 83, \"y\": 9}, {\"x\": 90, \"y\": 9}, {\"x\": 132, \"y\": 3}, {\"x\": 114, \"y\": 23}, {\"x\": 123, \"y\": 47}, {\"x\": 647, \"y\": 79}, {\"x\": 641, \"y\": 87}, {\"x\": 725, \"y\": 77}]</code></p>",
      "rawMarkdown": "I noticed the ground truth for training annotation file 039d3e82ebaf.json does not list points from left to right (or from top-to-bottom).  The relevant part of the json is:\n`\"data-series\": [{\"x\": 46, \"y\": 10}, {\"x\": 82, \"y\": 9}, {\"x\": 83, \"y\": 9}, {\"x\": 90, \"y\": 9}, {\"x\": 132, \"y\": 3}, {\"x\": 114, \"y\": 23}, {\"x\": 123, \"y\": 47}, {\"x\": 647, \"y\": 79}, {\"x\": 641, \"y\": 87}, {\"x\": 725, \"y\": 77}]`",
      "votes": null
    },
    {
      "id": "2203487",
      "postDate": "03/30/2023 21:04:28",
      "content": "<p>Thanks for the heads up. I'll make an update to regularize this.</p>",
      "rawMarkdown": "Thanks for the heads up. I'll make an update to regularize this.",
      "votes": null
    },
    {
      "id": "2203541",
      "postDate": "03/30/2023 22:44:06",
      "content": "<p>For what it's worth even if the ground truth points are ordered this could still be an issue for nearly the same x-values.  Imagine a ground truth like: <code>\"data-series\": [{\"x\": 50, \"y\": 100}, {\"x\": 50.01, \"y\": -100}]</code>.  A prediction of <code>\"data-series\": [{\"x\": 50, \"y\": -100}, {\"x\": 50.01, \"y\": 100}]</code> gets a score for the y-series of <code>0.24</code>.  While a prediction of something like <code>\"data-series\": [{\"x\": 50, \"y\": 0}, {\"x\": 50.01, \"y\": 0}]</code> gets a score for the y-series of <code>0.54</code>.  I need to absolutely check the math, but I suspect that if there was an equal chance of the y-values being in either order guessing the average of the 2 y-values gives the maximum expected score.</p>\n<p>I am guessing this isn't that big of an issue for overall scores (unless there are a lot of scatter plots with most of the points having nearly the same x-values and a wide range of y-values), but posting just so it is a noted issue.  I will probably also background-think about if there is an efficient way to determine the ordering of the points in a prediction that gives the best score.</p>",
      "rawMarkdown": "For what it's worth even if the ground truth points are ordered this could still be an issue for nearly the same x-values.  Imagine a ground truth like: `\"data-series\": [{\"x\": 50, \"y\": 100}, {\"x\": 50.01, \"y\": -100}]`.  A prediction of `\"data-series\": [{\"x\": 50, \"y\": -100}, {\"x\": 50.01, \"y\": 100}]` gets a score for the y-series of `0.24`.  While a prediction of something like `\"data-series\": [{\"x\": 50, \"y\": 0}, {\"x\": 50.01, \"y\": 0}]` gets a score for the y-series of `0.54`.  I need to absolutely check the math, but I suspect that if there was an equal chance of the y-values being in either order guessing the average of the 2 y-values gives the maximum expected score.\n\nI am guessing this isn't that big of an issue for overall scores (unless there are a lot of scatter plots with most of the points having nearly the same x-values and a wide range of y-values), but posting just so it is a noted issue.  I will probably also background-think about if there is an efficient way to determine the ordering of the points in a prediction that gives the best score.",
      "votes": null
    },
    {
      "id": "2239487",
      "postDate": "04/29/2023 14:54:35",
      "content": "<p>Should we take points from top to bottom for a horizontal bar graph? <a href=\"https://www.kaggle.com/ryanholbrook\" target=\"_blank\">@ryanholbrook</a> </p>",
      "rawMarkdown": "Should we take points from top to bottom for a horizontal bar graph? @ryanholbrook",
      "votes": null
    },
    {
      "id": "2306525",
      "postDate": "06/17/2023 11:34:06",
      "content": "<p>I have the same question but no answer!</p>",
      "rawMarkdown": "I have the same question but no answer!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2199099,
      "author_name": "ryanholbrook",
      "author_url": "",
      "post_date": "03/27/2023 14:01:59",
      "content": "<p><a href=\"https://www.kaggle.com/pabyrnes\" target=\"_blank\">@pabyrnes</a> Great question. This wasn't addressed sufficiently in the documentation. Generally, you should take points from left to right on the x-axis with the corresponding y-values. For your scatter plot example, let me double check if there's an ambiguity possible. If so, I may need to make a data update.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2203478,
          "author_name": "pabyrnes",
          "author_url": "",
          "post_date": "03/30/2023 20:47:30",
          "content": "<p>I noticed the ground truth for training annotation file 039d3e82ebaf.json does not list points from left to right (or from top-to-bottom).  The relevant part of the json is:<br>\n<code>\"data-series\": [{\"x\": 46, \"y\": 10}, {\"x\": 82, \"y\": 9}, {\"x\": 83, \"y\": 9}, {\"x\": 90, \"y\": 9}, {\"x\": 132, \"y\": 3}, {\"x\": 114, \"y\": 23}, {\"x\": 123, \"y\": 47}, {\"x\": 647, \"y\": 79}, {\"x\": 641, \"y\": 87}, {\"x\": 725, \"y\": 77}]</code></p>",
          "votes": null,
          "replies": [
            {
              "id": 2203487,
              "author_name": "ryanholbrook",
              "author_url": "",
              "post_date": "03/30/2023 21:04:28",
              "content": "<p>Thanks for the heads up. I'll make an update to regularize this.</p>",
              "votes": null,
              "replies": [
                {
                  "id": 2203541,
                  "author_name": "pabyrnes",
                  "author_url": "",
                  "post_date": "03/30/2023 22:44:06",
                  "content": "<p>For what it's worth even if the ground truth points are ordered this could still be an issue for nearly the same x-values.  Imagine a ground truth like: <code>\"data-series\": [{\"x\": 50, \"y\": 100}, {\"x\": 50.01, \"y\": -100}]</code>.  A prediction of <code>\"data-series\": [{\"x\": 50, \"y\": -100}, {\"x\": 50.01, \"y\": 100}]</code> gets a score for the y-series of <code>0.24</code>.  While a prediction of something like <code>\"data-series\": [{\"x\": 50, \"y\": 0}, {\"x\": 50.01, \"y\": 0}]</code> gets a score for the y-series of <code>0.54</code>.  I need to absolutely check the math, but I suspect that if there was an equal chance of the y-values being in either order guessing the average of the 2 y-values gives the maximum expected score.</p>\n<p>I am guessing this isn't that big of an issue for overall scores (unless there are a lot of scatter plots with most of the points having nearly the same x-values and a wide range of y-values), but posting just so it is a noted issue.  I will probably also background-think about if there is an efficient way to determine the ordering of the points in a prediction that gives the best score.</p>",
                  "votes": null,
                  "replies": []
                }
              ]
            }
          ]
        },
        {
          "id": 2239487,
          "author_name": "zhugds",
          "author_url": "",
          "post_date": "04/29/2023 14:54:35",
          "content": "<p>Should we take points from top to bottom for a horizontal bar graph? <a href=\"https://www.kaggle.com/ryanholbrook\" target=\"_blank\">@ryanholbrook</a> </p>",
          "votes": null,
          "replies": [
            {
              "id": 2306525,
              "author_name": "hamzahabduljalil",
              "author_url": "",
              "post_date": "06/17/2023 11:34:06",
              "content": "<p>I have the same question but no answer!</p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2197885": "An example of where this would be a concern would be a scatter plot with points at (1, 1), (1, 2), (2,1), (2, 2). Consider the following predictions which are just a reordering of the points:\n- x-series of [1, 1, 2, 2] and y-series of [1, 2, 1, 2]\n- x-series of [1, 1, 2, 2] and y-series of [2, 1, 2, 1]\n\nDo these predictions get the same score?  Is there some criteria we are supposed to use to determine the desired order?\n\nFor many charts there is a natural order, but this is not necessarily true for scatter plots.",
    "2199099": "pabyrnes Great question. This wasn't addressed sufficiently in the documentation. Generally, you should take points from left to right on the x-axis with the corresponding y-values. For your scatter plot example, let me double check if there's an ambiguity possible. If so, I may need to make a data update.",
    "2203478": "I noticed the ground truth for training annotation file 039d3e82ebaf.json does not list points from left to right (or from top-to-bottom).  The relevant part of the json is:\n`\"data-series\": [{\"x\": 46, \"y\": 10}, {\"x\": 82, \"y\": 9}, {\"x\": 83, \"y\": 9}, {\"x\": 90, \"y\": 9}, {\"x\": 132, \"y\": 3}, {\"x\": 114, \"y\": 23}, {\"x\": 123, \"y\": 47}, {\"x\": 647, \"y\": 79}, {\"x\": 641, \"y\": 87}, {\"x\": 725, \"y\": 77}]`",
    "2203487": "Thanks for the heads up. I'll make an update to regularize this.",
    "2203541": "For what it's worth even if the ground truth points are ordered this could still be an issue for nearly the same x-values.  Imagine a ground truth like: `\"data-series\": [{\"x\": 50, \"y\": 100}, {\"x\": 50.01, \"y\": -100}]`.  A prediction of `\"data-series\": [{\"x\": 50, \"y\": -100}, {\"x\": 50.01, \"y\": 100}]` gets a score for the y-series of `0.24`.  While a prediction of something like `\"data-series\": [{\"x\": 50, \"y\": 0}, {\"x\": 50.01, \"y\": 0}]` gets a score for the y-series of `0.54`.  I need to absolutely check the math, but I suspect that if there was an equal chance of the y-values being in either order guessing the average of the 2 y-values gives the maximum expected score.\n\nI am guessing this isn't that big of an issue for overall scores (unless there are a lot of scatter plots with most of the points having nearly the same x-values and a wide range of y-values), but posting just so it is a noted issue.  I will probably also background-think about if there is an efficient way to determine the ordering of the points in a prediction that gives the best score.",
    "2239487": "Should we take points from top to bottom for a horizontal bar graph? @ryanholbrook",
    "2306525": "I have the same question but no answer!"
  },
  "source": "meta"
}