{
  "id": 21820,
  "title": "Sparse Matrix",
  "url": "/competitions/grupo-bimbo-inventory-demand/discussion/21820",
  "author_name": "",
  "post_date": "2016-06-21T08:47:48.120Z",
  "votes": 1,
  "comment_count": 1,
  "views": 571,
  "content": "<p>How to create a sparse matrix for categorical variables. I have a 8GB RAM and by using sparse.model.Matrix() of R's Matrix package is going out of memory. Can anyone suggest some solution over this?</p>",
  "messages": [
    {
      "id": "124682",
      "postDate": "06/21/2016 08:47:48",
      "content": "<p>How to create a sparse matrix for categorical variables. I have a 8GB RAM and by using sparse.model.Matrix() of R's Matrix package is going out of memory. Can anyone suggest some solution over this?</p>",
      "rawMarkdown": "How to create a sparse matrix for categorical variables. I have a 8GB RAM and by using sparse.model.Matrix() of R's Matrix package is going out of memory. Can anyone suggest some solution over this?",
      "votes": null
    },
    {
      "id": "130126",
      "postDate": "08/04/2016 05:25:24",
      "content": "<p>Couldn't you just encode the matrix elements as a dictionary? You're presumably computing a matrix product at some point, or summing over elements in the matrix which means looking up values with a particular index in the dictionary and adding the value to the running total.</p>",
      "rawMarkdown": "Couldn't you just encode the matrix elements as a dictionary? You're presumably computing a matrix product at some point, or summing over elements in the matrix which means looking up values with a particular index in the dictionary and adding the value to the running total.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 130126,
      "author_name": "ikirwi",
      "author_url": "",
      "post_date": "08/04/2016 05:25:24",
      "content": "<p>Couldn't you just encode the matrix elements as a dictionary? You're presumably computing a matrix product at some point, or summing over elements in the matrix which means looking up values with a particular index in the dictionary and adding the value to the running total.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "124682": "How to create a sparse matrix for categorical variables. I have a 8GB RAM and by using sparse.model.Matrix() of R's Matrix package is going out of memory. Can anyone suggest some solution over this?",
    "130126": "Couldn't you just encode the matrix elements as a dictionary? You're presumably computing a matrix product at some point, or summing over elements in the matrix which means looking up values with a particular index in the dictionary and adding the value to the running total."
  },
  "source": "meta"
}