{
  "id": 5159,
  "title": "MemoryError for RandomForest in Python",
  "url": "/competitions/digit-recognizer/discussion/5159",
  "author_name": "bourneli",
  "post_date": "2013-07-20T08:07:12.417000",
  "votes": 0,
  "comment_count": 2,
  "views": null,
  "content": "<p>I use random forest in sklearn package.</p>\n<p>When I train the model with more than 32,000 images, it always caused memoryerror as following:</p>\n<p><img src=\"http://images.cnblogs.com/cnblogs_com/bourneli/499570/o_memoryerror.png\" alt=\"memory error\" width=\"714\" height=\"176\"></p>\n<p>However, with 30,000 images, it is OK!</p>\n<p>So, I think there is a memory limit for function concatenate between 30,000 and 32,000.</p>\n<p>&nbsp;</p>\n<p>My PC is&nbsp;</p>\n<p>OS: x86 32bit Win7</p>\n<p>Memory: 4GB</p>\n<p>&nbsp;</p>\n<p>I noticed that when the error happened, there is enough memory available, as following, so I think there is bug for function &quot;concatenate &quot;?</p>\n<p><img src=\"http://images.cnblogs.com/cnblogs_com/bourneli/499570/o_error_happen.png\" alt=\"image_error\" width=\"388\" height=\"140\"></p>\n<p>&nbsp;</p>\n<p>Can anyone help me to solve this problem?</p>\n<p>&nbsp;</p>\n<p>&nbsp;</p>",
  "messages": [
    {
      "id": 27484,
      "postDate": "2013-07-21T08:23:24.593Z",
      "content": "<p>The problem is solved when changing the envrionent from 32 bit Win7 &nbsp;to 64 bit.</p>\n<p>Python 2.7 and related packges all replalced by the 64 bit version</p>\n<p>&nbsp;</p>",
      "votes": 1
    },
    {
      "id": 27483,
      "postDate": "2013-07-21T08:20:55.050Z"
    },
    {
      "id": 27466,
      "postDate": "2013-07-20T08:07:12.417Z",
      "content": "<p>I use random forest in sklearn package.</p>\n<p>When I train the model with more than 32,000 images, it always caused memoryerror as following:</p>\n<p><img src=\"http://images.cnblogs.com/cnblogs_com/bourneli/499570/o_memoryerror.png\" alt=\"memory error\" width=\"714\" height=\"176\"></p>\n<p>However, with 30,000 images, it is OK!</p>\n<p>So, I think there is a memory limit for function concatenate between 30,000 and 32,000.</p>\n<p>&nbsp;</p>\n<p>My PC is&nbsp;</p>\n<p>OS: x86 32bit Win7</p>\n<p>Memory: 4GB</p>\n<p>&nbsp;</p>\n<p>I noticed that when the error happened, there is enough memory available, as following, so I think there is bug for function &quot;concatenate &quot;?</p>\n<p><img src=\"http://images.cnblogs.com/cnblogs_com/bourneli/499570/o_error_happen.png\" alt=\"image_error\" width=\"388\" height=\"140\"></p>\n<p>&nbsp;</p>\n<p>Can anyone help me to solve this problem?</p>\n<p>&nbsp;</p>\n<p>&nbsp;</p>"
    }
  ],
  "comments": [
    {
      "id": 27484,
      "author_name": "bourneli",
      "author_url": "",
      "post_date": "2013-07-21T08:23:24.593000",
      "content": "<p>The problem is solved when changing the envrionent from 32 bit Win7 &nbsp;to 64 bit.</p>\n<p>Python 2.7 and related packges all replalced by the 64 bit version</p>\n<p>&nbsp;</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 27483,
      "author_name": "bourneli",
      "author_url": "",
      "post_date": "2013-07-21T08:20:55.050000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "27484": "",
    "27483": "",
    "27466": ""
  }
}