{
  "id": 9409,
  "title": "Submission error",
  "url": "/competitions/acquire-valued-shoppers-challenge/discussion/9409",
  "author_name": "",
  "post_date": "2014-06-07T14:00:19.437Z",
  "votes": null,
  "comment_count": 2,
  "views": 776,
  "content": "<p>I got &quot;Evaluation Exception: Submission must have 151484 rows&quot; error when submission, but &quot;wc -l ${submission_file}&quot; shows 151484.</p>\n\n<p>I use following python&nbsp;to generate submission file:</p>\n\n<p>&quot;&quot;&quot;</p>\n<p>submission_file = open('data/submission.csv','wb')<br>submission_file.write('id,repeatProbability\\n')<br>for i, predicted_repurchased_times in enumerate(prdiect):<br>&nbsp; &nbsp; &nbsp;submission_file.write(test_histories[i].user + ',' + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;str(predicted_repurchased_times) + '\\n')<br>submission_file.close()</p>\n<p>&quot;&quot;&quot;</p>\n\n<p>What's wrong with my code for generation file or the evaluation program???</p>",
  "messages": [
    {
      "id": "48829",
      "postDate": "06/07/2014 14:00:19",
      "content": "<p>I got &quot;Evaluation Exception: Submission must have 151484 rows&quot; error when submission, but &quot;wc -l ${submission_file}&quot; shows 151484.</p>\n\n<p>I use following python&nbsp;to generate submission file:</p>\n\n<p>&quot;&quot;&quot;</p>\n<p>submission_file = open('data/submission.csv','wb')<br>submission_file.write('id,repeatProbability\\n')<br>for i, predicted_repurchased_times in enumerate(prdiect):<br>&nbsp; &nbsp; &nbsp;submission_file.write(test_histories[i].user + ',' + &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;str(predicted_repurchased_times) + '\\n')<br>submission_file.close()</p>\n<p>&quot;&quot;&quot;</p>\n\n<p>What's wrong with my code for generation file or the evaluation program???</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "48848",
      "postDate": "06/07/2014 22:34:40",
      "content": "<p>You should include a header as well, bringing the submission up to 151485 lines.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "48851",
      "postDate": "06/08/2014 01:32:01",
      "content": "<p>[quote=idle_speculation;48848]</p>\n<p>You should include a header as well, bringing the submission up to 151485 lines.</p>\n<p>[/quote]</p>\n\n<p>Hmm. &nbsp;Looks like the header's already included, though. &nbsp;For me there's always one id that doesn't have a prediction - haven't bothered to figure it out yet. &nbsp;Maybe check and see if you've got it in your prediction file?</p>\n\n<p>The ID is:</p>\n<p>4853598737</p>\n\n<p>If you don't have it, you could just throw it in with a 0.</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 48848,
      "author_name": "speculation",
      "author_url": "",
      "post_date": "06/07/2014 22:34:40",
      "content": "<p>You should include a header as well, bringing the submission up to 151485 lines.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 48851,
      "author_name": "philculliton",
      "author_url": "",
      "post_date": "06/08/2014 01:32:01",
      "content": "<p>[quote=idle_speculation;48848]</p>\n<p>You should include a header as well, bringing the submission up to 151485 lines.</p>\n<p>[/quote]</p>\n\n<p>Hmm. &nbsp;Looks like the header's already included, though. &nbsp;For me there's always one id that doesn't have a prediction - haven't bothered to figure it out yet. &nbsp;Maybe check and see if you've got it in your prediction file?</p>\n\n<p>The ID is:</p>\n<p>4853598737</p>\n\n<p>If you don't have it, you could just throw it in with a 0.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "48829": "",
    "48848": "",
    "48851": ""
  },
  "source": "meta"
}