{
  "id": 514303,
  "title": "The R2 score on the validation data is very high.",
  "url": "/competitions/leap-atmospheric-physics-ai-climsim/discussion/514303",
  "author_name": "kinohito",
  "post_date": "2024-06-23T15:03:57.162000",
  "votes": 3,
  "comment_count": 8,
  "views": 0,
  "content": "<p>When calculating the R2 score on validation data, using denormalized model outputs yields a very high R2 score, close to 0.9. However, using the normalized values directly aligns closely with LB scores. Can anyone explain the reason behind this discrepancy? </p>",
  "messages": [
    {
      "id": 2886293,
      "postDate": "2024-06-23T15:03:57.163Z",
      "content": "<p>When calculating the R2 score on validation data, using denormalized model outputs yields a very high R2 score, close to 0.9. However, using the normalized values directly aligns closely with LB scores. Can anyone explain the reason behind this discrepancy? </p>",
      "rawMarkdown": "When calculating the R2 score on validation data, using denormalized model outputs yields a very high R2 score, close to 0.9. However, using the normalized values directly aligns closely with LB scores. Can anyone explain the reason behind this discrepancy? ",
      "votes": 3
    },
    {
      "id": 2886761,
      "postDate": "2024-06-23T19:10:27.437Z",
      "content": "<p>When using denormalized data do you use original float64 data as y_true or converted to float32?</p>",
      "rawMarkdown": "When using denormalized data do you use original float64 data as y_true or converted to float32?",
      "replies": [
        {
          "id": 2886940,
          "postDate": "2024-06-23T23:54:20.623Z",
          "content": "<p>Thank you for your comment. I normalize the data in float64 and then convert it to float32 for training.</p>",
          "rawMarkdown": "Thank you for your comment. I normalize the data in float64 and then convert it to float32 for training.",
          "replies": [
            {
              "id": 2887332,
              "postDate": "2024-06-24T06:28:28.067Z",
              "content": "<p>Try calculating R2 on denormalized predicts and original labels</p>",
              "rawMarkdown": "Try calculating R2 on denormalized predicts and original labels"
            },
            {
              "id": 2887529,
              "postDate": "2024-06-24T08:48:39.627Z",
              "content": "<p>have you fixed the problem,i use pytorch nn for the new weights，the valid r2 is 0.9x</p>",
              "rawMarkdown": "have you fixed the problem,i use pytorch nn for the new weights，the valid r2 is 0.9x"
            },
            {
              "id": 2896175,
              "postDate": "2024-06-29T16:36:50.233Z",
              "content": "<p>Me too. I am using pytorch nn, also not convert data to float32, try calculating R2 on denormalized predicts and original labels, and normalized them for training. I got 0.9x for valid and got only 0.3 for actual submission</p>",
              "rawMarkdown": "Me too. I am using pytorch nn, also not convert data to float32, try calculating R2 on denormalized predicts and original labels, and normalized them for training. I got 0.9x for valid and got only 0.3 for actual submission"
            },
            {
              "id": 2902209,
              "postDate": "2024-07-03T06:13:10.037Z",
              "content": "<p>I am in the same situation as well. What should we do? Is the dataset leaking?</p>",
              "rawMarkdown": "I am in the same situation as well. What should we do? Is the dataset leaking?"
            },
            {
              "id": 2902231,
              "postDate": "2024-07-03T06:28:23.473Z",
              "content": "<p>You should calculate R2 with the original unprocessed data.</p>",
              "rawMarkdown": "You should calculate R2 with the original unprocessed data."
            },
            {
              "id": 2902273,
              "postDate": "2024-07-03T06:57:13.607Z",
              "content": "<p>I managed to resolve the issue, although the root cause remains unclear. I recommend calculating the R2 score using Scikit-learn and then clipping the values between 0 and 1.</p>",
              "rawMarkdown": "I managed to resolve the issue, although the root cause remains unclear. I recommend calculating the R2 score using Scikit-learn and then clipping the values between 0 and 1."
            }
          ]
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 2886761,
      "author_name": "DennisSakva",
      "author_url": "",
      "post_date": "2024-06-23T19:10:27.437000",
      "content": "<p>When using denormalized data do you use original float64 data as y_true or converted to float32?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2886940,
          "author_name": "kinohito",
          "author_url": "",
          "post_date": "2024-06-23T23:54:20.623000",
          "content": "<p>Thank you for your comment. I normalize the data in float64 and then convert it to float32 for training.</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2887332,
              "author_name": "DennisSakva",
              "author_url": "",
              "post_date": "2024-06-24T06:28:28.067000",
              "content": "<p>Try calculating R2 on denormalized predicts and original labels</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2887529,
              "author_name": "yanqiangmiffy",
              "author_url": "",
              "post_date": "2024-06-24T08:48:39.627000",
              "content": "<p>have you fixed the problem,i use pytorch nn for the new weights，the valid r2 is 0.9x</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2896175,
              "author_name": "pluk io",
              "author_url": "",
              "post_date": "2024-06-29T16:36:50.233000",
              "content": "<p>Me too. I am using pytorch nn, also not convert data to float32, try calculating R2 on denormalized predicts and original labels, and normalized them for training. I got 0.9x for valid and got only 0.3 for actual submission</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2902209,
              "author_name": "TOUGH MIYAZAWA",
              "author_url": "",
              "post_date": "2024-07-03T06:13:10.037000",
              "content": "<p>I am in the same situation as well. What should we do? Is the dataset leaking?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2902231,
              "author_name": "DennisSakva",
              "author_url": "",
              "post_date": "2024-07-03T06:28:23.473000",
              "content": "<p>You should calculate R2 with the original unprocessed data.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2902273,
              "author_name": "kinohito",
              "author_url": "",
              "post_date": "2024-07-03T06:57:13.607000",
              "content": "<p>I managed to resolve the issue, although the root cause remains unclear. I recommend calculating the R2 score using Scikit-learn and then clipping the values between 0 and 1.</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2886293": "When calculating the R2 score on validation data, using denormalized model outputs yields a very high R2 score, close to 0.9. However, using the normalized values directly aligns closely with LB scores. Can anyone explain the reason behind this discrepancy? ",
    "2886761": "When using denormalized data do you use original float64 data as y_true or converted to float32?"
  }
}