{
  "id": 11073,
  "title": "ff -package",
  "url": "/competitions/avazu-ctr-prediction/discussion/11073",
  "author_name": "",
  "post_date": "2014-11-27T19:47:11.517Z",
  "votes": 1,
  "comment_count": 6,
  "views": 2698,
  "content": "<p>Hello.</p>\n<p>Im new to analyzing so big files of data and have been searching around the web and the forums here for a solution to my RAM - problems. I figured out that the ff-package was the way to go. This seemed fine until I was going to take a look at my new and exciting ffdf file.... and then figured out it was only one column ...</p>\n<p>Is it supposed to do this? Or does anyone have a solution for me ?<br><br>Thanks<br>Magnus</p>\n<p>....it just occured to me that there is such a thing as seperators... which I guess will solve the problem.</p>",
  "messages": [
    {
      "id": "59116",
      "postDate": "11/27/2014 19:47:11",
      "content": "<p>Hello.</p>\n<p>Im new to analyzing so big files of data and have been searching around the web and the forums here for a solution to my RAM - problems. I figured out that the ff-package was the way to go. This seemed fine until I was going to take a look at my new and exciting ffdf file.... and then figured out it was only one column ...</p>\n<p>Is it supposed to do this? Or does anyone have a solution for me ?<br><br>Thanks<br>Magnus</p>\n<p>....it just occured to me that there is such a thing as seperators... which I guess will solve the problem.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "59137",
      "postDate": "11/28/2014 04:52:07",
      "content": "<p>Hi Magnus, &nbsp;A package SOAR may also be of interest to you as it helps to save memory while storing the records on disk in R.</p>\n<p>Cheers</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "59165",
      "postDate": "11/28/2014 15:37:09",
      "content": "<p>[quote=Magnus R. Aunevik-Berntsen;59116]</p>\n<p>and then figured out it was only one column ...</p>\n<p>Is it supposed to do this? Or does anyone have a solution for me ?</p>\n<p>[/quote]</p>\n<p>I've been using the <em>ff</em> package for data manipulation and transformations in this competition. If you haven't solved the problem yet here is a good way to load data into ffdf objects.</p>\n<p><a href=\"http://pastebin.com/4745tB13\">http://pastebin.com/4745tB13</a></p>\n<p>The reason why I read the first 1000 lines using the standard <em>read.csv</em> function is that the parameter <em>x</em> in the <em>read.table.ffdf /read.csv.ffdf</em> function, &quot;...defines crucial features that are otherwise determined during the 'first' chunk of reading: vmodes, colnames, colClasses, sequence of predefined levels.&quot; So basically that's how I let&nbsp;<em> read.table.ffdf </em> know what colClasses I want. Just an FYI <em>read.table.ffdf </em>cannot read class &quot;character&quot;, you have to change its class to factor.</p>\n<p>In the end it should look something like this:</p>\n<p><a href=\"https://imgur.com/QeefEi2\">https://imgur.com/QeefEi2</a></p>\n<p>I hope this helps.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "59166",
      "postDate": "11/28/2014 15:38:13",
      "content": "<p>DUPLICATE POST,</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "59213",
      "postDate": "11/29/2014 10:24:16",
      "content": "<p>Thanks for the help! Just got to see if Im able to get anything sensible out of the data then.. =)</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "59217",
      "postDate": "11/29/2014 10:55:58",
      "content": "<p>Yep, I didn't have any problem with using ff. Make sure you are using read.csv.ffdf, since it is comma delimited. Also always load ffbase since it has a lot of good tools. But mine worked fine as is:</p>\n\n<p><br>require(ffbase)<br>require(ff)</p>\n\n<p>#load data into ffdf</p>\n<p>train.data = read.csv.ffdf(file = './data/train.data.csv', header = T)</p>\n<p>#save data<br>save.ffdf(train.data, dir='./train.data')</p>\n<p>#get dimensions of data<br>dim(train.data)<br><br></p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "59465",
      "postDate": "12/03/2014 15:16:11",
      "content": "<p>pi_informatics&nbsp;what &nbsp;method &nbsp;to &nbsp;you &nbsp; &nbsp;use &nbsp;for &nbsp;training &nbsp;with &nbsp;so &nbsp;much &nbsp;data?Or &nbsp;are you just sampling &nbsp; on the &nbsp; train &nbsp;data set?</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 59137,
      "author_name": "drpatrickchan",
      "author_url": "",
      "post_date": "11/28/2014 04:52:07",
      "content": "<p>Hi Magnus, &nbsp;A package SOAR may also be of interest to you as it helps to save memory while storing the records on disk in R.</p>\n<p>Cheers</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 59165,
      "author_name": "wacaxx",
      "author_url": "",
      "post_date": "11/28/2014 15:37:09",
      "content": "<p>[quote=Magnus R. Aunevik-Berntsen;59116]</p>\n<p>and then figured out it was only one column ...</p>\n<p>Is it supposed to do this? Or does anyone have a solution for me ?</p>\n<p>[/quote]</p>\n<p>I've been using the <em>ff</em> package for data manipulation and transformations in this competition. If you haven't solved the problem yet here is a good way to load data into ffdf objects.</p>\n<p><a href=\"http://pastebin.com/4745tB13\">http://pastebin.com/4745tB13</a></p>\n<p>The reason why I read the first 1000 lines using the standard <em>read.csv</em> function is that the parameter <em>x</em> in the <em>read.table.ffdf /read.csv.ffdf</em> function, &quot;...defines crucial features that are otherwise determined during the 'first' chunk of reading: vmodes, colnames, colClasses, sequence of predefined levels.&quot; So basically that's how I let&nbsp;<em> read.table.ffdf </em> know what colClasses I want. Just an FYI <em>read.table.ffdf </em>cannot read class &quot;character&quot;, you have to change its class to factor.</p>\n<p>In the end it should look something like this:</p>\n<p><a href=\"https://imgur.com/QeefEi2\">https://imgur.com/QeefEi2</a></p>\n<p>I hope this helps.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 59166,
      "author_name": "wacaxx",
      "author_url": "",
      "post_date": "11/28/2014 15:38:13",
      "content": "<p>DUPLICATE POST,</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 59213,
      "author_name": "berntsen",
      "author_url": "",
      "post_date": "11/29/2014 10:24:16",
      "content": "<p>Thanks for the help! Just got to see if Im able to get anything sensible out of the data then.. =)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 59217,
      "author_name": "piinformatics",
      "author_url": "",
      "post_date": "11/29/2014 10:55:58",
      "content": "<p>Yep, I didn't have any problem with using ff. Make sure you are using read.csv.ffdf, since it is comma delimited. Also always load ffbase since it has a lot of good tools. But mine worked fine as is:</p>\n\n<p><br>require(ffbase)<br>require(ff)</p>\n\n<p>#load data into ffdf</p>\n<p>train.data = read.csv.ffdf(file = './data/train.data.csv', header = T)</p>\n<p>#save data<br>save.ffdf(train.data, dir='./train.data')</p>\n<p>#get dimensions of data<br>dim(train.data)<br><br></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 59465,
      "author_name": "",
      "author_url": "",
      "post_date": "12/03/2014 15:16:11",
      "content": "<p>pi_informatics&nbsp;what &nbsp;method &nbsp;to &nbsp;you &nbsp; &nbsp;use &nbsp;for &nbsp;training &nbsp;with &nbsp;so &nbsp;much &nbsp;data?Or &nbsp;are you just sampling &nbsp; on the &nbsp; train &nbsp;data set?</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "59116": "",
    "59137": "",
    "59165": "",
    "59166": "",
    "59213": "",
    "59217": "",
    "59465": ""
  },
  "source": "meta"
}