{
  "id": 2798,
  "title": "Python Boilerplate",
  "url": "/competitions/MerckActivity/discussion/2798",
  "author_name": "",
  "post_date": "2012-10-02T22:12:03.693Z",
  "votes": 4,
  "comment_count": 3,
  "views": 2748,
  "content": "<p>I decided to share the boilerplate for Python.</p>\r\n<p>I came up with an interesting solution to the managing models over so many CSV files. You could save a little memory by loading the test dataset when you need it, and not before. Usually I wouldn't nest magic variables like that, but there's not an obvious\r\n way around it without weirding up the call signature. You probably need to sample ACT1 and ACT6 to fit them in memory.</p>",
  "messages": [
    {
      "id": "15092",
      "postDate": "10/02/2012 22:12:03",
      "content": "<p>I decided to share the boilerplate for Python.</p>\r\n<p>I came up with an interesting solution to the managing models over so many CSV files. You could save a little memory by loading the test dataset when you need it, and not before. Usually I wouldn't nest magic variables like that, but there's not an obvious\r\n way around it without weirding up the call signature. You probably need to sample ACT1 and ACT6 to fit them in memory.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15185",
      "postDate": "10/05/2012 01:24:55",
      "content": "<p>I thank you very much for posting this. I keep considering diving into Python, and this makes it a little less scary. I couldn't imagine trying it if pandas didn't exist. Still, I get slight headaches when I think of working with categorical variables.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15186",
      "postDate": "10/05/2012 02:15:51",
      "content": "<p>Glad someone's using it. Here's an updated version: I fixed a off-by-one error and deleted the silly model at the end.</p>\r\n<p>Pandas is great. Fills in a lot of functionality I didn't know I was missing coming from Python/Matlab/C. I know it has 'reshape2'-like functionality, what categorical data handling are you referring to? Care to explain with R?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "15213",
      "postDate": "10/06/2012 01:31:14",
      "content": "<p>I was thinking of either full dummy coding in sparse matrix format or impact coding with varying amounts of ridging. I know pandas has split-apply-combine for the latter, but does it have something equivalent to sparse.model.matrix()?</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 15185,
      "author_name": "biasvariance",
      "author_url": "",
      "post_date": "10/05/2012 01:24:55",
      "content": "<p>I thank you very much for posting this. I keep considering diving into Python, and this makes it a little less scary. I couldn't imagine trying it if pandas didn't exist. Still, I get slight headaches when I think of working with categorical variables.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15186,
      "author_name": "jacobm",
      "author_url": "",
      "post_date": "10/05/2012 02:15:51",
      "content": "<p>Glad someone's using it. Here's an updated version: I fixed a off-by-one error and deleted the silly model at the end.</p>\r\n<p>Pandas is great. Fills in a lot of functionality I didn't know I was missing coming from Python/Matlab/C. I know it has 'reshape2'-like functionality, what categorical data handling are you referring to? Care to explain with R?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 15213,
      "author_name": "biasvariance",
      "author_url": "",
      "post_date": "10/06/2012 01:31:14",
      "content": "<p>I was thinking of either full dummy coding in sparse matrix format or impact coding with varying amounts of ridging. I know pandas has split-apply-combine for the latter, but does it have something equivalent to sparse.model.matrix()?</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "15092": "",
    "15185": "",
    "15186": "",
    "15213": ""
  },
  "source": "meta"
}