{
  "id": 417695,
  "title": "Error in The Evaluation Metric",
  "url": "/competitions/benetech-making-graphs-accessible/discussion/417695",
  "author_name": "",
  "post_date": "2023-06-16T19:18:53.955268800Z",
  "votes": null,
  "comment_count": 19,
  "views": 0,
  "content": "<p>I have two questions: </p>\n<p><strong>- Should I convert all values of x and y lists to string type in the submission file?</strong></p>\n<ul>\n<li>I have seen that if the list of x values is integer list and the corresponding ground truth list is string, that throws an error? For example, imagine you have a vertical bar chat, the ground truth list of the x-axis should be string type but your classifier incorrectly predicts this as horizontal bar chart and your algorithm, based on this incorrect prediction, returns integer x-list. In this case, if we use the code of the evaluation metric is used in Kaggle, that throws an error. How can I suppress this error or fix this problem?</li>\n</ul>\n<p>I am asking this question because when I submit my final submission file, if the error occurs, that will prevent me from getting the score.</p>\n<p>Thank you for your help</p>",
  "messages": [
    {
      "id": "2305574",
      "postDate": "06/16/2023 19:18:53",
      "content": "<p>I have two questions: </p>\n<p><strong>- Should I convert all values of x and y lists to string type in the submission file?</strong></p>\n<ul>\n<li>I have seen that if the list of x values is integer list and the corresponding ground truth list is string, that throws an error? For example, imagine you have a vertical bar chat, the ground truth list of the x-axis should be string type but your classifier incorrectly predicts this as horizontal bar chart and your algorithm, based on this incorrect prediction, returns integer x-list. In this case, if we use the code of the evaluation metric is used in Kaggle, that throws an error. How can I suppress this error or fix this problem?</li>\n</ul>\n<p>I am asking this question because when I submit my final submission file, if the error occurs, that will prevent me from getting the score.</p>\n<p>Thank you for your help</p>",
      "rawMarkdown": "I have two questions: \n\n**- Should I convert all values of x and y lists to string type in the submission file?**\n\n- I have seen that if the list of x values is integer list and the corresponding ground truth list is string, that throws an error? For example, imagine you have a vertical bar chat, the ground truth list of the x-axis should be string type but your classifier incorrectly predicts this as horizontal bar chart and your algorithm, based on this incorrect prediction, returns integer x-list. In this case, if we use the code of the evaluation metric is used in Kaggle, that throws an error. How can I suppress this error or fix this problem?\n\nI am asking this question because when I submit my final submission file, if the error occurs, that will prevent me from getting the score.\n\nThank you for your help",
      "votes": null
    },
    {
      "id": "2305645",
      "postDate": "06/16/2023 20:14:29",
      "content": "<p>The data has to be a string because it is delimited by <code>;</code></p>\n<p>Good:  <br>\n1;2;3  <br>\n1.0;2.0;3.0  </p>\n<p>Bad:  <br>\n\"1\";\"2\";\"3\"  <br>\n[1, 2, 3]  </p>",
      "rawMarkdown": "The data has to be a string because it is delimited by `;`\n\nGood:  \n1;2;3  \n1.0;2.0;3.0  \n\nBad:  \n\"1\";\"2\";\"3\"  \n[1, 2, 3]",
      "votes": null
    },
    {
      "id": "2305671",
      "postDate": "06/16/2023 20:41:34",
      "content": "<p>Thank you, Nicholas. So all data should be in a string format in the submission.csv file.</p>",
      "rawMarkdown": "Thank you, Nicholas. So all data should be in a string format in the submission.csv file.",
      "votes": null
    },
    {
      "id": "2305683",
      "postDate": "06/16/2023 20:57:53",
      "content": "<p><a href=\"https://www.kaggle.com/hamzahabduljalil\" target=\"_blank\">@hamzahabduljalil</a> <br>\nRegarding your second question, which score calculation code are you using? The official published notebooks will not be able to handle some corner cases. If the chart_type and value_type do not match on submission, I think you will only get a score of 0 for that sample, but you will get an overall score.</p>",
      "rawMarkdown": "hamzahabduljalil \nRegarding your second question, which score calculation code are you using? The official published notebooks will not be able to handle some corner cases. If the chart_type and value_type do not match on submission, I think you will only get a score of 0 for that sample, but you will get an overall score.",
      "votes": null
    },
    {
      "id": "2305828",
      "postDate": "06/16/2023 23:47:29",
      "content": "<p>Thank you for your reply. I should have given a clearer example than in the question. Imagine that you have a vertical bar and your algorithm correctly classifies it. The y values are 1.5;2.5;3.5;4.5;5.5;6.5 as ground truth, but let assume that your algorithm (OCR) cannot detect the y-ticks values correctly, and you end up with i, 2.5, 3, 4, 5. The OCR mistakenly recognizes the 1 as i and,  therefore, your predicted y values will be categorical rather than numerical. Now, if you evaluate your predicted y-values against the ground truth values by the publicly published notebook in Kaggle, that will throw an error because it cannot evaluate numerical values against categorical. I have my own validation data and I have few examples where it throws an error and because of the bad recognition of the OCR. That's why I am asking how we can solve this problem. </p>",
      "rawMarkdown": "Thank you for your reply. I should have given a clearer example than in the question. Imagine that you have a vertical bar and your algorithm correctly classifies it. The y values are 1.5;2.5;3.5;4.5;5.5;6.5 as ground truth, but let assume that your algorithm (OCR) cannot detect the y-ticks values correctly, and you end up with i, 2.5, 3, 4, 5. The OCR mistakenly recognizes the 1 as i and,  therefore, your predicted y values will be categorical rather than numerical. Now, if you evaluate your predicted y-values against the ground truth values by the publicly published notebook in Kaggle, that will throw an error because it cannot evaluate numerical values against categorical. I have my own validation data and I have few examples where it throws an error and because of the bad recognition of the OCR. That's why I am asking how we can solve this problem.",
      "votes": null
    },
    {
      "id": "2305830",
      "postDate": "06/16/2023 23:49:02",
      "content": "<p>Could you please read my above comment because I try to explain the problem clearer.</p>",
      "rawMarkdown": "Could you please read my above comment because I try to explain the problem clearer.",
      "votes": null
    },
    {
      "id": "2305859",
      "postDate": "06/17/2023 00:40:57",
      "content": "<p><a href=\"https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/398528\" target=\"_blank\">https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/398528</a></p>",
      "rawMarkdown": "https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/398528",
      "votes": null
    },
    {
      "id": "2306021",
      "postDate": "06/17/2023 04:06:27",
      "content": "<p>In that case the score will be 0, as Nicholas is referring to the thread. If the numerical type is expected to be correct, the error can be avoided by replacing the prediction with 0 when it cannot be converted to a float type, for example. (ex. i, 2.5, 3, 4, 5 -&gt; 0, 2.5, 3, 4, 5)</p>",
      "rawMarkdown": "In that case the score will be 0, as Nicholas is referring to the thread. If the numerical type is expected to be correct, the error can be avoided by replacing the prediction with 0 when it cannot be converted to a float type, for example. (ex. i, 2.5, 3, 4, 5 -> 0, 2.5, 3, 4, 5)",
      "votes": null
    },
    {
      "id": "2306344",
      "postDate": "06/17/2023 08:17:56",
      "content": "<p>Thank you for both of you. I checked <a href=\"https://www.kaggle.com/code/ryanholbrook/competition-metric-benetech-mixed-match\" target=\"_blank\">this notebook</a> but there is no check if the <strong>y_pred</strong> is the same type of y_true before calling:        </p>\n<pre><code>         normalized_levenshtein_score(y_true, y_pred)\n    :\n         normalized_rmse(y_true, y_pred)\n</code></pre>\n<p>Is the evaluation metric used in the submission file on the website the same as this notebook?</p>",
      "rawMarkdown": "Thank you for both of you. I checked [this notebook](https://www.kaggle.com/code/ryanholbrook/competition-metric-benetech-mixed-match) but there is no check if the **y_pred** is the same type of y_true before calling:        \n```python\n        return normalized_levenshtein_score(y_true, y_pred)\n    else:\n        return normalized_rmse(y_true, y_pred)\n```\nIs the evaluation metric used in the submission file on the website the same as this notebook?",
      "votes": null
    },
    {
      "id": "2306399",
      "postDate": "06/17/2023 09:11:49",
      "content": "<p>I think not.</p>",
      "rawMarkdown": "I think not.",
      "votes": null
    },
    {
      "id": "2306417",
      "postDate": "06/17/2023 09:32:32",
      "content": "<p>Then, the the error will occur in the case of mismatch between the types of GT values and predicted y-values on the website over the test dataset? <br>\nWhat do you think <a href=\"https://www.kaggle.com/ryanholbrook\" target=\"_blank\">@ryanholbrook</a>? </p>",
      "rawMarkdown": "Then, the the error will occur in the case of mismatch between the types of GT values and predicted y-values on the website over the test dataset? \nWhat do you think @ryanholbrook?",
      "votes": null
    },
    {
      "id": "2306434",
      "postDate": "06/17/2023 09:42:17",
      "content": "<p>In the case of data type mismatch, that particular prediction will get 0 score. You can follow the discussion here: <a href=\"https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/398528#2203085\" target=\"_blank\">https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/398528#2203085</a></p>",
      "rawMarkdown": "In the case of data type mismatch, that particular prediction will get 0 score. You can follow the discussion here: https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/398528#2203085",
      "votes": null
    },
    {
      "id": "2306443",
      "postDate": "06/17/2023 09:49:00",
      "content": "<p>Thank you <a href=\"https://www.kaggle.com/conjuring92\" target=\"_blank\">@conjuring92</a> . There is an update on the notebook which evaluates the test dataset on the website. But this is <a href=\"https://www.kaggle.com/code/ryanholbrook/competition-metric-benetech-mixed-match\" target=\"_blank\">notebook</a> is not updated, right? </p>",
      "rawMarkdown": "Thank you @conjuring92 . There is an update on the notebook which evaluates the test dataset on the website. But this is [notebook](https://www.kaggle.com/code/ryanholbrook/competition-metric-benetech-mixed-match) is not updated, right?",
      "votes": null
    },
    {
      "id": "2306451",
      "postDate": "06/17/2023 10:04:09",
      "content": "<p>yes, I think actual eval code is slightly different from the notebook</p>",
      "rawMarkdown": "yes, I think actual eval code is slightly different from the notebook",
      "votes": null
    },
    {
      "id": "2308119",
      "postDate": "06/18/2023 16:56:40",
      "content": "<p><a href=\"https://www.kaggle.com/nbroad\" target=\"_blank\">@nbroad</a> hi Nicholas, I was expecting I will have a submission score error. Could you please look at this question <a href=\"https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/418077\" target=\"_blank\">here</a> and tell me if I have something wrong? I highly appriciate your time. </p>",
      "rawMarkdown": "nbroad hi Nicholas, I was expecting I will have a submission score error. Could you please look at this question [here](https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/418077) and tell me if I have something wrong? I highly appriciate your time.",
      "votes": null
    },
    {
      "id": "2308121",
      "postDate": "06/18/2023 16:57:40",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/conjuring92\" target=\"_blank\">@conjuring92</a> I was expecting I will have a submission score error. Could you please look at this question <a href=\"https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/418077\" target=\"_blank\">here</a>and tell me if I have something wrong? I highly appriciate your time. </p>",
      "rawMarkdown": "Hi @conjuring92 I was expecting I will have a submission score error. Could you please look at this question [here](https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/418077)and tell me if I have something wrong? I highly appriciate your time.",
      "votes": null
    },
    {
      "id": "2308145",
      "postDate": "06/18/2023 17:16:51",
      "content": "<p>I'm not quite sure why you're getting the scoring error. Maybe instead of <code>'chart_type': ' '</code> use <code>'chart_type': 'line'</code> (or any other possible types) inside the exception block…</p>",
      "rawMarkdown": "I'm not quite sure why you're getting the scoring error. Maybe instead of `'chart_type': ' '` use `'chart_type': 'line'` (or any other possible types) inside the exception block...",
      "votes": null
    },
    {
      "id": "2308154",
      "postDate": "06/18/2023 17:28:16",
      "content": "<p><a href=\"https://www.kaggle.com/conjuring92\" target=\"_blank\">@conjuring92</a> , thank you, could you please also tell me what I should fill the x_values and y_values in case of exception to avoid this nightmare error?</p>",
      "rawMarkdown": "conjuring92 , thank you, could you please also tell me what I should fill the x_values and y_values in case of exception to avoid this nightmare error?",
      "votes": null
    },
    {
      "id": "2308172",
      "postDate": "06/18/2023 17:48:08",
      "content": "<p>I think your current exception handling for x_values and y_values are okay</p>",
      "rawMarkdown": "I think your current exception handling for x_values and y_values are okay",
      "votes": null
    },
    {
      "id": "2308180",
      "postDate": "06/18/2023 17:54:57",
      "content": "<p><a href=\"https://www.kaggle.com/conjuring92\" target=\"_blank\">@conjuring92</a> you so much. I hope you the best :)</p>",
      "rawMarkdown": "conjuring92 you so much. I hope you the best :)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2305645,
      "author_name": "nbroad",
      "author_url": "",
      "post_date": "06/16/2023 20:14:29",
      "content": "<p>The data has to be a string because it is delimited by <code>;</code></p>\n<p>Good:  <br>\n1;2;3  <br>\n1.0;2.0;3.0  </p>\n<p>Bad:  <br>\n\"1\";\"2\";\"3\"  <br>\n[1, 2, 3]  </p>",
      "votes": null,
      "replies": [
        {
          "id": 2305671,
          "author_name": "hamzahabduljalil",
          "author_url": "",
          "post_date": "06/16/2023 20:41:34",
          "content": "<p>Thank you, Nicholas. So all data should be in a string format in the submission.csv file.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 2305830,
          "author_name": "hamzahabduljalil",
          "author_url": "",
          "post_date": "06/16/2023 23:49:02",
          "content": "<p>Could you please read my above comment because I try to explain the problem clearer.</p>",
          "votes": null,
          "replies": [
            {
              "id": 2308119,
              "author_name": "hamzahabduljalil",
              "author_url": "",
              "post_date": "06/18/2023 16:56:40",
              "content": "<p><a href=\"https://www.kaggle.com/nbroad\" target=\"_blank\">@nbroad</a> hi Nicholas, I was expecting I will have a submission score error. Could you please look at this question <a href=\"https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/418077\" target=\"_blank\">here</a> and tell me if I have something wrong? I highly appriciate your time. </p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2305683,
      "author_name": "ryotayoshinobu",
      "author_url": "",
      "post_date": "06/16/2023 20:57:53",
      "content": "<p><a href=\"https://www.kaggle.com/hamzahabduljalil\" target=\"_blank\">@hamzahabduljalil</a> <br>\nRegarding your second question, which score calculation code are you using? The official published notebooks will not be able to handle some corner cases. If the chart_type and value_type do not match on submission, I think you will only get a score of 0 for that sample, but you will get an overall score.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2305828,
          "author_name": "hamzahabduljalil",
          "author_url": "",
          "post_date": "06/16/2023 23:47:29",
          "content": "<p>Thank you for your reply. I should have given a clearer example than in the question. Imagine that you have a vertical bar and your algorithm correctly classifies it. The y values are 1.5;2.5;3.5;4.5;5.5;6.5 as ground truth, but let assume that your algorithm (OCR) cannot detect the y-ticks values correctly, and you end up with i, 2.5, 3, 4, 5. The OCR mistakenly recognizes the 1 as i and,  therefore, your predicted y values will be categorical rather than numerical. Now, if you evaluate your predicted y-values against the ground truth values by the publicly published notebook in Kaggle, that will throw an error because it cannot evaluate numerical values against categorical. I have my own validation data and I have few examples where it throws an error and because of the bad recognition of the OCR. That's why I am asking how we can solve this problem. </p>",
          "votes": null,
          "replies": [
            {
              "id": 2305859,
              "author_name": "nbroad",
              "author_url": "",
              "post_date": "06/17/2023 00:40:57",
              "content": "<p><a href=\"https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/398528\" target=\"_blank\">https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/398528</a></p>",
              "votes": null,
              "replies": [
                {
                  "id": 2306021,
                  "author_name": "ryotayoshinobu",
                  "author_url": "",
                  "post_date": "06/17/2023 04:06:27",
                  "content": "<p>In that case the score will be 0, as Nicholas is referring to the thread. If the numerical type is expected to be correct, the error can be avoided by replacing the prediction with 0 when it cannot be converted to a float type, for example. (ex. i, 2.5, 3, 4, 5 -&gt; 0, 2.5, 3, 4, 5)</p>",
                  "votes": null,
                  "replies": [
                    {
                      "id": 2306344,
                      "author_name": "hamzahabduljalil",
                      "author_url": "",
                      "post_date": "06/17/2023 08:17:56",
                      "content": "<p>Thank you for both of you. I checked <a href=\"https://www.kaggle.com/code/ryanholbrook/competition-metric-benetech-mixed-match\" target=\"_blank\">this notebook</a> but there is no check if the <strong>y_pred</strong> is the same type of y_true before calling:        </p>\n<pre><code>         normalized_levenshtein_score(y_true, y_pred)\n    :\n         normalized_rmse(y_true, y_pred)\n</code></pre>\n<p>Is the evaluation metric used in the submission file on the website the same as this notebook?</p>",
                      "votes": null,
                      "replies": [
                        {
                          "id": 2306399,
                          "author_name": "ryotayoshinobu",
                          "author_url": "",
                          "post_date": "06/17/2023 09:11:49",
                          "content": "<p>I think not.</p>",
                          "votes": null,
                          "replies": [
                            {
                              "id": 2306417,
                              "author_name": "hamzahabduljalil",
                              "author_url": "",
                              "post_date": "06/17/2023 09:32:32",
                              "content": "<p>Then, the the error will occur in the case of mismatch between the types of GT values and predicted y-values on the website over the test dataset? <br>\nWhat do you think <a href=\"https://www.kaggle.com/ryanholbrook\" target=\"_blank\">@ryanholbrook</a>? </p>",
                              "votes": null,
                              "replies": [
                                {
                                  "id": 2306434,
                                  "author_name": "conjuring92",
                                  "author_url": "",
                                  "post_date": "06/17/2023 09:42:17",
                                  "content": "<p>In the case of data type mismatch, that particular prediction will get 0 score. You can follow the discussion here: <a href=\"https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/398528#2203085\" target=\"_blank\">https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/398528#2203085</a></p>",
                                  "votes": null,
                                  "replies": [
                                    {
                                      "id": 2306443,
                                      "author_name": "hamzahabduljalil",
                                      "author_url": "",
                                      "post_date": "06/17/2023 09:49:00",
                                      "content": "<p>Thank you <a href=\"https://www.kaggle.com/conjuring92\" target=\"_blank\">@conjuring92</a> . There is an update on the notebook which evaluates the test dataset on the website. But this is <a href=\"https://www.kaggle.com/code/ryanholbrook/competition-metric-benetech-mixed-match\" target=\"_blank\">notebook</a> is not updated, right? </p>",
                                      "votes": null,
                                      "replies": [
                                        {
                                          "id": 2306451,
                                          "author_name": "conjuring92",
                                          "author_url": "",
                                          "post_date": "06/17/2023 10:04:09",
                                          "content": "<p>yes, I think actual eval code is slightly different from the notebook</p>",
                                          "votes": null,
                                          "replies": [
                                            {
                                              "id": 2308121,
                                              "author_name": "hamzahabduljalil",
                                              "author_url": "",
                                              "post_date": "06/18/2023 16:57:40",
                                              "content": "<p>Hi <a href=\"https://www.kaggle.com/conjuring92\" target=\"_blank\">@conjuring92</a> I was expecting I will have a submission score error. Could you please look at this question <a href=\"https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/418077\" target=\"_blank\">here</a>and tell me if I have something wrong? I highly appriciate your time. </p>",
                                              "votes": null,
                                              "replies": [
                                                {
                                                  "id": 2308145,
                                                  "author_name": "conjuring92",
                                                  "author_url": "",
                                                  "post_date": "06/18/2023 17:16:51",
                                                  "content": "<p>I'm not quite sure why you're getting the scoring error. Maybe instead of <code>'chart_type': ' '</code> use <code>'chart_type': 'line'</code> (or any other possible types) inside the exception block…</p>",
                                                  "votes": null,
                                                  "replies": [
                                                    {
                                                      "id": 2308154,
                                                      "author_name": "hamzahabduljalil",
                                                      "author_url": "",
                                                      "post_date": "06/18/2023 17:28:16",
                                                      "content": "<p><a href=\"https://www.kaggle.com/conjuring92\" target=\"_blank\">@conjuring92</a> , thank you, could you please also tell me what I should fill the x_values and y_values in case of exception to avoid this nightmare error?</p>",
                                                      "votes": null,
                                                      "replies": [
                                                        {
                                                          "id": 2308172,
                                                          "author_name": "conjuring92",
                                                          "author_url": "",
                                                          "post_date": "06/18/2023 17:48:08",
                                                          "content": "<p>I think your current exception handling for x_values and y_values are okay</p>",
                                                          "votes": null,
                                                          "replies": [
                                                            {
                                                              "id": 2308180,
                                                              "author_name": "hamzahabduljalil",
                                                              "author_url": "",
                                                              "post_date": "06/18/2023 17:54:57",
                                                              "content": "<p><a href=\"https://www.kaggle.com/conjuring92\" target=\"_blank\">@conjuring92</a> you so much. I hope you the best :)</p>",
                                                              "votes": null,
                                                              "replies": []
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  ]
                                                }
                                              ]
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2305574": "I have two questions: \n\n**- Should I convert all values of x and y lists to string type in the submission file?**\n\n- I have seen that if the list of x values is integer list and the corresponding ground truth list is string, that throws an error? For example, imagine you have a vertical bar chat, the ground truth list of the x-axis should be string type but your classifier incorrectly predicts this as horizontal bar chart and your algorithm, based on this incorrect prediction, returns integer x-list. In this case, if we use the code of the evaluation metric is used in Kaggle, that throws an error. How can I suppress this error or fix this problem?\n\nI am asking this question because when I submit my final submission file, if the error occurs, that will prevent me from getting the score.\n\nThank you for your help",
    "2305645": "The data has to be a string because it is delimited by `;`\n\nGood:  \n1;2;3  \n1.0;2.0;3.0  \n\nBad:  \n\"1\";\"2\";\"3\"  \n[1, 2, 3]",
    "2305671": "Thank you, Nicholas. So all data should be in a string format in the submission.csv file.",
    "2305683": "hamzahabduljalil \nRegarding your second question, which score calculation code are you using? The official published notebooks will not be able to handle some corner cases. If the chart_type and value_type do not match on submission, I think you will only get a score of 0 for that sample, but you will get an overall score.",
    "2305828": "Thank you for your reply. I should have given a clearer example than in the question. Imagine that you have a vertical bar and your algorithm correctly classifies it. The y values are 1.5;2.5;3.5;4.5;5.5;6.5 as ground truth, but let assume that your algorithm (OCR) cannot detect the y-ticks values correctly, and you end up with i, 2.5, 3, 4, 5. The OCR mistakenly recognizes the 1 as i and,  therefore, your predicted y values will be categorical rather than numerical. Now, if you evaluate your predicted y-values against the ground truth values by the publicly published notebook in Kaggle, that will throw an error because it cannot evaluate numerical values against categorical. I have my own validation data and I have few examples where it throws an error and because of the bad recognition of the OCR. That's why I am asking how we can solve this problem.",
    "2305830": "Could you please read my above comment because I try to explain the problem clearer.",
    "2305859": "https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/398528",
    "2306021": "In that case the score will be 0, as Nicholas is referring to the thread. If the numerical type is expected to be correct, the error can be avoided by replacing the prediction with 0 when it cannot be converted to a float type, for example. (ex. i, 2.5, 3, 4, 5 -> 0, 2.5, 3, 4, 5)",
    "2306344": "Thank you for both of you. I checked [this notebook](https://www.kaggle.com/code/ryanholbrook/competition-metric-benetech-mixed-match) but there is no check if the **y_pred** is the same type of y_true before calling:        \n```python\n        return normalized_levenshtein_score(y_true, y_pred)\n    else:\n        return normalized_rmse(y_true, y_pred)\n```\nIs the evaluation metric used in the submission file on the website the same as this notebook?",
    "2306399": "I think not.",
    "2306417": "Then, the the error will occur in the case of mismatch between the types of GT values and predicted y-values on the website over the test dataset? \nWhat do you think @ryanholbrook?",
    "2306434": "In the case of data type mismatch, that particular prediction will get 0 score. You can follow the discussion here: https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/398528#2203085",
    "2306443": "Thank you @conjuring92 . There is an update on the notebook which evaluates the test dataset on the website. But this is [notebook](https://www.kaggle.com/code/ryanholbrook/competition-metric-benetech-mixed-match) is not updated, right?",
    "2306451": "yes, I think actual eval code is slightly different from the notebook",
    "2308119": "nbroad hi Nicholas, I was expecting I will have a submission score error. Could you please look at this question [here](https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/418077) and tell me if I have something wrong? I highly appriciate your time.",
    "2308121": "Hi @conjuring92 I was expecting I will have a submission score error. Could you please look at this question [here](https://www.kaggle.com/competitions/benetech-making-graphs-accessible/discussion/418077)and tell me if I have something wrong? I highly appriciate your time.",
    "2308145": "I'm not quite sure why you're getting the scoring error. Maybe instead of `'chart_type': ' '` use `'chart_type': 'line'` (or any other possible types) inside the exception block...",
    "2308154": "conjuring92 , thank you, could you please also tell me what I should fill the x_values and y_values in case of exception to avoid this nightmare error?",
    "2308172": "I think your current exception handling for x_values and y_values are okay",
    "2308180": "conjuring92 you so much. I hope you the best :)"
  },
  "source": "meta"
}