{
  "id": 294080,
  "title": "Why my Submission reports a \"Submission Scoring Error\"",
  "url": "/competitions/g-research-crypto-forecasting/discussion/294080",
  "author_name": "Zhihuan Xue",
  "post_date": "2021-12-08T10:46:48.518000",
  "votes": 1,
  "comment_count": 3,
  "views": 0,
  "content": "<p><a href=\"https://www.kaggle.com/xuantianfengwu/digital-currency-competition\" target=\"_blank\">https://www.kaggle.com/xuantianfengwu/digital-currency-competition</a></p>\n<p>I am trying to understand the gresearch_crypto.make_env() and here is my Submission.</p>\n<p>`import gresearch_crypto<br>\nenv = gresearch_crypto.make_env()   # initialize the environment<br>\niter_test = env.iter_test()    # an iterator which loops over the test set and sample submission</p>\n<p>for (test_df, sample_prediction_df) in iter_test:<br>\n    answer = pd.merge(test_df, <br>\n                      train[train['timestamp']==test_df['timestamp'][0]], <br>\n                      how='left', <br>\n                      on=['timestamp', 'Asset_ID']) [['row_id', 'Target']]<br>\n    sample_prediction_df['Target'] = answer['Target'].fillna(0.0)</p>\n<pre><code>#sample_prediction_df['Target'] = 0.01\n\nenv.predict(sample_prediction_df)   # register your predictions`\n</code></pre>\n<p>I don't understand why the very very simple submission reports \"Submission Scoring Error\", can anyone helps to point out why the error happens.</p>\n<p>I really don't think the competition holder has a very clear introduction of the competition rule and data provided.</p>",
  "messages": [
    {
      "id": 1612471,
      "postDate": "2021-12-09T02:10:31.493Z",
      "content": "<p>Someone posted a similar error, the problem was with test_df['timestamp'][0]</p>\n<p>Someone suggested them to change it to test_df['timestamp'].iloc[0] as the notebook is ran over test set batches in which they don't necessary start with zero index.</p>\n<p>The person who had the issue reported that this change resolved the error, will try to find the post link</p>",
      "rawMarkdown": "Someone posted a similar error, the problem was with test_df['timestamp'][0]\n\nSomeone suggested them to change it to test_df['timestamp'].iloc[0] as the notebook is ran over test set batches in which they don't necessary start with zero index.\n\nThe person who had the issue reported that this change resolved the error, will try to find the post link",
      "votes": 3,
      "replies": [
        {
          "id": 1612474,
          "postDate": "2021-12-09T02:12:41.350Z",
          "content": "<p>Here <br>\n<a href=\"https://www.kaggle.com/c/g-research-crypto-forecasting/discussion/291891\" target=\"_blank\">https://www.kaggle.com/c/g-research-crypto-forecasting/discussion/291891</a></p>",
          "rawMarkdown": "Here \nhttps://www.kaggle.com/c/g-research-crypto-forecasting/discussion/291891",
          "votes": 1
        }
      ]
    },
    {
      "id": 1611869,
      "postDate": "2021-12-08T10:46:48.520Z",
      "content": "<p><a href=\"https://www.kaggle.com/xuantianfengwu/digital-currency-competition\" target=\"_blank\">https://www.kaggle.com/xuantianfengwu/digital-currency-competition</a></p>\n<p>I am trying to understand the gresearch_crypto.make_env() and here is my Submission.</p>\n<p>`import gresearch_crypto<br>\nenv = gresearch_crypto.make_env()   # initialize the environment<br>\niter_test = env.iter_test()    # an iterator which loops over the test set and sample submission</p>\n<p>for (test_df, sample_prediction_df) in iter_test:<br>\n    answer = pd.merge(test_df, <br>\n                      train[train['timestamp']==test_df['timestamp'][0]], <br>\n                      how='left', <br>\n                      on=['timestamp', 'Asset_ID']) [['row_id', 'Target']]<br>\n    sample_prediction_df['Target'] = answer['Target'].fillna(0.0)</p>\n<pre><code>#sample_prediction_df['Target'] = 0.01\n\nenv.predict(sample_prediction_df)   # register your predictions`\n</code></pre>\n<p>I don't understand why the very very simple submission reports \"Submission Scoring Error\", can anyone helps to point out why the error happens.</p>\n<p>I really don't think the competition holder has a very clear introduction of the competition rule and data provided.</p>",
      "rawMarkdown": "https://www.kaggle.com/xuantianfengwu/digital-currency-competition\n\nI am trying to understand the gresearch_crypto.make_env() and here is my Submission.\n\n`import gresearch_crypto\nenv = gresearch_crypto.make_env()   # initialize the environment\niter_test = env.iter_test()    # an iterator which loops over the test set and sample submission\n\nfor (test_df, sample_prediction_df) in iter_test:\n    answer = pd.merge(test_df, \n                      train[train['timestamp']==test_df['timestamp'][0]], \n                      how='left', \n                      on=['timestamp', 'Asset_ID']) [['row_id', 'Target']]\n    sample_prediction_df['Target'] = answer['Target'].fillna(0.0)\n\n    #sample_prediction_df['Target'] = 0.01\n    \n    env.predict(sample_prediction_df)   # register your predictions`\n\nI don't understand why the very very simple submission reports \"Submission Scoring Error\", can anyone helps to point out why the error happens.\n\nI really don't think the competition holder has a very clear introduction of the competition rule and data provided.",
      "votes": 1
    },
    {
      "id": 1612472,
      "postDate": "2021-12-09T02:12:05.500Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 1612471,
      "author_name": "Shady Mokh",
      "author_url": "",
      "post_date": "2021-12-09T02:10:31.493000",
      "content": "<p>Someone posted a similar error, the problem was with test_df['timestamp'][0]</p>\n<p>Someone suggested them to change it to test_df['timestamp'].iloc[0] as the notebook is ran over test set batches in which they don't necessary start with zero index.</p>\n<p>The person who had the issue reported that this change resolved the error, will try to find the post link</p>",
      "votes": 3,
      "replies": [
        {
          "id": 1612474,
          "author_name": "Shady Mokh",
          "author_url": "",
          "post_date": "2021-12-09T02:12:41.350000",
          "content": "<p>Here <br>\n<a href=\"https://www.kaggle.com/c/g-research-crypto-forecasting/discussion/291891\" target=\"_blank\">https://www.kaggle.com/c/g-research-crypto-forecasting/discussion/291891</a></p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1612472,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-12-09T02:12:05.500000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1612471": "Someone posted a similar error, the problem was with test_df['timestamp'][0]\n\nSomeone suggested them to change it to test_df['timestamp'].iloc[0] as the notebook is ran over test set batches in which they don't necessary start with zero index.\n\nThe person who had the issue reported that this change resolved the error, will try to find the post link",
    "1611869": "https://www.kaggle.com/xuantianfengwu/digital-currency-competition\n\nI am trying to understand the gresearch_crypto.make_env() and here is my Submission.\n\n`import gresearch_crypto\nenv = gresearch_crypto.make_env()   # initialize the environment\niter_test = env.iter_test()    # an iterator which loops over the test set and sample submission\n\nfor (test_df, sample_prediction_df) in iter_test:\n    answer = pd.merge(test_df, \n                      train[train['timestamp']==test_df['timestamp'][0]], \n                      how='left', \n                      on=['timestamp', 'Asset_ID']) [['row_id', 'Target']]\n    sample_prediction_df['Target'] = answer['Target'].fillna(0.0)\n\n    #sample_prediction_df['Target'] = 0.01\n    \n    env.predict(sample_prediction_df)   # register your predictions`\n\nI don't understand why the very very simple submission reports \"Submission Scoring Error\", can anyone helps to point out why the error happens.\n\nI really don't think the competition holder has a very clear introduction of the competition rule and data provided.",
    "1612472": ""
  }
}