{
  "id": 23070,
  "title": "Handling Dataset This Big with Limited Memory",
  "url": "/competitions/bosch-production-line-performance/discussion/23070",
  "author_name": "",
  "post_date": "2016-08-24T13:28:14.553Z",
  "votes": 6,
  "comment_count": 15,
  "views": 3174,
  "content": "<p>I am very interested in this competition because i work in manufacturing and is a data analyst. This is the first time i have seen a leading manufacturer in the world using machine learning to improve quality and this is definitively something that my company can learn from. \nThis competition shows that the manufacturing industry has extended their business excellence efforts from traditional Lean and Six Sigma methodologies to machine learning or predictive modeling.\nFor now, the biggest challenge for me is that i cannot find a computer that has big enough memory that can handle this big dataset. I am thinking using subsamples to for modeling but loading the dataset into R is already a challenge for me.\nI use nothing else but R.\nCan anyone provide any advice of loading maybe partial of the original dataset into R for modeling process? </p>",
  "messages": [
    {
      "id": "132313",
      "postDate": "08/24/2016 13:28:14",
      "content": "<p>I am very interested in this competition because i work in manufacturing and is a data analyst. This is the first time i have seen a leading manufacturer in the world using machine learning to improve quality and this is definitively something that my company can learn from. \nThis competition shows that the manufacturing industry has extended their business excellence efforts from traditional Lean and Six Sigma methodologies to machine learning or predictive modeling.\nFor now, the biggest challenge for me is that i cannot find a computer that has big enough memory that can handle this big dataset. I am thinking using subsamples to for modeling but loading the dataset into R is already a challenge for me.\nI use nothing else but R.\nCan anyone provide any advice of loading maybe partial of the original dataset into R for modeling process? </p>",
      "rawMarkdown": "I am very interested in this competition because i work in manufacturing and is a data analyst. This is the first time i have seen a leading manufacturer in the world using machine learning to improve quality and this is definitively something that my company can learn from. \r\nThis competition shows that the manufacturing industry has extended their business excellence efforts from traditional Lean and Six Sigma methodologies to machine learning or predictive modeling.\r\nFor now, the biggest challenge for me is that i cannot find a computer that has big enough memory that can handle this big dataset. I am thinking using subsamples to for modeling but loading the dataset into R is already a challenge for me.\r\nI use nothing else but R.\r\nCan anyone provide any advice of loading maybe partial of the original dataset into R for modeling process?",
      "votes": null
    },
    {
      "id": "132318",
      "postDate": "08/24/2016 14:18:33",
      "content": "<p>Hi Felix, </p>\n\n<p>generally I would recommend you to invest some time to learn python. It usually works smoother with larger datasets, has a much cleaner syntax, and (imho) a better developed framework at least for common supervised machine learning tasks (sci-kit learn). It might take some time to get you started, but it will definitely make you a better data analyst (and kaggler).  </p>\n\n<p>Your question was about R though ;). I would start off with the numerical features only, that's about two gigs which you should be able to read into R using the fread function from the data.table package ( the base R read.csv function is usually too slow for datasets this size). Once you have your data in R, I would recommend you have a look at the h2o package, that acts basically as an interface to a JVM (java virtual machine) and handles larger datasets much better. If you have medium memory (8-16 GB) you should be fine. If you have much less, you can still subsample the data in R and train a few models on the subsample. Then if you developed some ideas, you can scale them up using AWS (there are some tutorials on the web which make it really easy to install RStudio Server on an EC2 instance).</p>\n\n<p>Hope this helps, </p>\n\n<p>Tim </p>",
      "rawMarkdown": "Hi Felix, \r\n\r\ngenerally I would recommend you to invest some time to learn python. It usually works smoother with larger datasets, has a much cleaner syntax, and (imho) a better developed framework at least for common supervised machine learning tasks (sci-kit learn). It might take some time to get you started, but it will definitely make you a better data analyst (and kaggler).  \r\n\r\nYour question was about R though ;). I would start off with the numerical features only, that's about two gigs which you should be able to read into R using the fread function from the data.table package ( the base R read.csv function is usually too slow for datasets this size). Once you have your data in R, I would recommend you have a look at the h2o package, that acts basically as an interface to a JVM (java virtual machine) and handles larger datasets much better. If you have medium memory (8-16 GB) you should be fine. If you have much less, you can still subsample the data in R and train a few models on the subsample. Then if you developed some ideas, you can scale them up using AWS (there are some tutorials on the web which make it really easy to install RStudio Server on an EC2 instance).\r\n\r\nHope this helps, \r\n\r\nTim",
      "votes": null
    },
    {
      "id": "132330",
      "postDate": "08/24/2016 15:53:32",
      "content": "<p>Another option might be renting an online computing resource (AWS, Google Cloud, Azure). You could probably get a pretty good rate, especially if you are just interested in using it for a few hours to explore and subsample the data. </p>",
      "rawMarkdown": "Another option might be renting an online computing resource (AWS, Google Cloud, Azure). You could probably get a pretty good rate, especially if you are just interested in using it for a few hours to explore and subsample the data.",
      "votes": null
    },
    {
      "id": "132337",
      "postDate": "08/24/2016 16:40:49",
      "content": "<p>Well, for low memory consumption I'd suggest looking at <a href=\"https://github.com/JohnLangford/vowpal_wabbit\">Vowpal Wabbit</a>. I'm giving it a try, but yet didn't get any result.</p>\n\n<p>The only think you should do is to read the csv files from Kaggle and transform it to the VW format. You can do it as a stream of data using Python's <a href=\"https://docs.python.org/2/library/zipfile.html\">zipfile</a>, <a href=\"https://docs.python.org/2/library/gzip.html\">gzip</a> and <a href=\"https://docs.python.org/2/library/csv.html\">csv</a>. This way, the memory footprint is minimal (you probably can run it in a 4Gb machine).</p>",
      "rawMarkdown": "Well, for low memory consumption I'd suggest looking at [Vowpal Wabbit](https://github.com/JohnLangford/vowpal_wabbit). I'm giving it a try, but yet didn't get any result.\r\n\r\nThe only think you should do is to read the csv files from Kaggle and transform it to the VW format. You can do it as a stream of data using Python's [zipfile](https://docs.python.org/2/library/zipfile.html), [gzip](https://docs.python.org/2/library/gzip.html) and [csv](https://docs.python.org/2/library/csv.html). This way, the memory footprint is minimal (you probably can run it in a 4Gb machine).",
      "votes": null
    },
    {
      "id": "132343",
      "postDate": "08/24/2016 17:26:49",
      "content": "<p>Hello felix,</p>\n\n<p>I agree with suggestions above, yet if you still wish to sample the dataset and prototype on that subset with R you can still do so using fread from data.table library.</p>\n\n<p>Use nrow parameter to define number of rows to read and select parameter to define desired columns.</p>\n\n<p>Let me know if you need more assistence (I available @ nathanie at post dot bgu dot ac dot il)</p>\n\n<p>Nati</p>",
      "rawMarkdown": "Hello felix,\r\n\r\n\r\nI agree with suggestions above, yet if you still wish to sample the dataset and prototype on that subset with R you can still do so using fread from data.table library.\r\n\r\nUse nrow parameter to define number of rows to read and select parameter to define desired columns.\r\n\r\nLet me know if you need more assistence (I available @ nathanie at post dot bgu dot ac dot il)\r\n\r\nNati",
      "votes": null
    },
    {
      "id": "132346",
      "postDate": "08/24/2016 18:23:26",
      "content": "<p>Hi Tim,\nI tried H2O </p>\n\n<pre><code>ptm &lt;- proc.time()\n</code></pre>\n\n<p>train_date &lt;- h2o.importFile(path=&quot;train_date.csv&quot;)\ntrain_categorical &lt;- h2o.importFile(path=&quot;train_categorical.csv&quot;)\ntrain_numeric &lt;- h2o.importFile(path=&quot;train_numeric.csv&quot;)\nproc.time() - ptm</p>\n\n<p>worked for some of the training data but then ran into java.lang.OutOfMemoryError, see below. Any suggestions how to fix that?</p>\n\n<p>Thanks</p>\n\n<p>Uwe</p>\n\n<blockquote>\n  <p>train_date &lt;- h2o.importFile(path=&quot;train_date.csv&quot;)\n    |==================================================                                                   |  50%</p>\n</blockquote>\n\n<p>DistributedException from /127.0.0.1:54321, caused by java.lang.OutOfMemoryError: Java heap space</p>\n\n<p>Error: DistributedException from /127.0.0.1:54321, caused by java.lang.OutOfMemoryError: Java heap space</p>\n\n<blockquote>\n  <p>train_categorical &lt;- h2o.importFile(path=&quot;train_categorical.csv&quot;)\n    |=====================================================================================================| 100%\n  train_numeric &lt;- h2o.importFile(path=&quot;train_numeric.csv&quot;)\n    |=====================================================================================================| 100%\n  proc.time() - ptm\n     user  system elapsed \n    2.943   0.181  75.119 </p>\n</blockquote>",
      "rawMarkdown": "Hi Tim,\r\nI tried H2O \r\n\r\n    ptm <- proc.time()\r\ntrain_date <- h2o.importFile(path=\"train_date.csv\")\r\ntrain_categorical <- h2o.importFile(path=\"train_categorical.csv\")\r\ntrain_numeric <- h2o.importFile(path=\"train_numeric.csv\")\r\nproc.time() - ptm\r\n\r\nworked for some of the training data but then ran into java.lang.OutOfMemoryError, see below. Any suggestions how to fix that?\r\n\r\nThanks\r\n\r\nUwe\r\n\r\n> train_date <- h2o.importFile(path=\"train_date.csv\")\r\n  |==================================================                                                   |  50%\r\n\r\nDistributedException from /127.0.0.1:54321, caused by java.lang.OutOfMemoryError: Java heap space\r\n\r\nError: DistributedException from /127.0.0.1:54321, caused by java.lang.OutOfMemoryError: Java heap space\r\n> train_categorical <- h2o.importFile(path=\"train_categorical.csv\")\r\n  |=====================================================================================================| 100%\r\n> train_numeric <- h2o.importFile(path=\"train_numeric.csv\")\r\n  |=====================================================================================================| 100%\r\n> proc.time() - ptm\r\n   user  system elapsed \r\n  2.943   0.181  75.119",
      "votes": null
    },
    {
      "id": "132349",
      "postDate": "08/24/2016 18:30:15",
      "content": "<p>sorry for the messy formatting, my first post with code... </p>",
      "rawMarkdown": "sorry for the messy formatting, my first post with code...",
      "votes": null
    },
    {
      "id": "132351",
      "postDate": "08/24/2016 18:43:29",
      "content": "<p>Well, seems like I found a solution, lets see if i manage to achieve a better formatting as well\nI increased the memory for H2o using <strong>max_mem_size</strong> <br>\nA character string specifying the maximum size, in bytes, of the memory allocation pool to H2O. This value must a multiple of 1024 greater than 2MB. Append the letter m or M to indicate megabytes, or g or G to indicate gigabytes. This value is only used when R starts H2O.</p>\n\n<pre><code>h2oServer &lt;- h2o.init(nthreads = -1, max_mem_size = &quot;7G&quot;)\nptm &lt;- proc.time()\ntrain_date &lt;- h2o.importFile(path=&quot;train_date.csv&quot;)\ntrain_categorical &lt;- h2o.importFile(path=&quot;train_categorical.csv&quot;)\ntrain_numeric &lt;- h2o.importFile(path=&quot;train_numeric.csv&quot;)\nproc.time() - ptm\n</code></pre>\n\n<p>H2O starts now with <strong>H2O cluster total memory:   6.22 GB</strong> \nAnd therefore I can read in the training data in no time</p>\n\n<p>user  system elapsed \n  3.857   0.208  80.088</p>\n\n<p>Using\nR version 3.3.1 (2016-06-21)\nPlatform: x86_64-apple-darwin13.4.0 (64-bit)\nRunning under: OS X 10.11.6 (El Capitan)</p>\n\n<p>Hopefully Felix has success as well!\nUwe</p>",
      "rawMarkdown": "Well, seems like I found a solution, lets see if i manage to achieve a better formatting as well\r\nI increased the memory for H2o using **max_mem_size**\t\r\nA character string specifying the maximum size, in bytes, of the memory allocation pool to H2O. This value must a multiple of 1024 greater than 2MB. Append the letter m or M to indicate megabytes, or g or G to indicate gigabytes. This value is only used when R starts H2O.\r\n\r\n    h2oServer <- h2o.init(nthreads = -1, max_mem_size = \"7G\")\r\n    ptm <- proc.time()\r\n    train_date <- h2o.importFile(path=\"train_date.csv\")\r\n    train_categorical <- h2o.importFile(path=\"train_categorical.csv\")\r\n    train_numeric <- h2o.importFile(path=\"train_numeric.csv\")\r\n    proc.time() - ptm\r\n\r\nH2O starts now with **H2O cluster total memory:   6.22 GB** \r\nAnd therefore I can read in the training data in no time\r\n\r\n   user  system elapsed \r\n  3.857   0.208  80.088\r\n\r\nUsing\r\nR version 3.3.1 (2016-06-21)\r\nPlatform: x86_64-apple-darwin13.4.0 (64-bit)\r\nRunning under: OS X 10.11.6 (El Capitan)\r\n\r\nHopefully Felix has success as well!\r\nUwe",
      "votes": null
    },
    {
      "id": "132372",
      "postDate": "08/24/2016 23:46:29",
      "content": "<p>Thanks to Tim Kreienkamp&#65292;Bojan Tunguz&#65292;Bruno G. do Amaral&#65292;Nathaniel Shimoni&#65292;Uwe Sterr!\nYou guys have provided me with multiple options to work with data. I will give them a try and hopefully one of them can work for me.</p>\n\n<p>p.s to Tim: actually I always wanted to learn Python because it is considered faster than R, but it seems very challenging for me because I started my career as a Six Sigma Black Belt and is statistics guy and R seemed natural to me while Python seemed unintuitive. But I have decided to follow your advice to learn Python, especially numpy,pandas and sci-kit learn packages. Do you have any recommendations on books or any other online resources that you think is suitable for beginners like me?</p>",
      "rawMarkdown": "Thanks to Tim Kreienkamp，Bojan Tunguz，Bruno G. do Amaral，Nathaniel Shimoni，Uwe Sterr!\r\nYou guys have provided me with multiple options to work with data. I will give them a try and hopefully one of them can work for me.\r\n\r\np.s to Tim: actually I always wanted to learn Python because it is considered faster than R, but it seems very challenging for me because I started my career as a Six Sigma Black Belt and is statistics guy and R seemed natural to me while Python seemed unintuitive. But I have decided to follow your advice to learn Python, especially numpy,pandas and sci-kit learn packages. Do you have any recommendations on books or any other online resources that you think is suitable for beginners like me?",
      "votes": null
    },
    {
      "id": "132399",
      "postDate": "08/25/2016 06:15:44",
      "content": "<p>FelixZhao besides books I would highly recommend looking at PyCon (python general), SciPy (scientific python) and PyData (python Data Science) conferences. They provide video recordings of all of their sessions. Very helpful.</p>\n\n<p>SciPy 2016 <a href=\"https://www.youtube.com/playlist?list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6\">https://www.youtube.com/playlist?list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6</a>\nSciPy 2015 <a href=\"https://www.youtube.com/playlist?list=PLYx7XA2nY5Gcpabmu61kKcToLz0FapmHu\">https://www.youtube.com/playlist?list=PLYx7XA2nY5Gcpabmu61kKcToLz0FapmHu</a></p>\n\n<p>PyData London 2016 <a href=\"https://www.youtube.com/watch?v=4Ulrsb_MSFo&list=PLGVZCDnMOq0qfJkoiFj-hN7lSHgQzXtqQ\">https://www.youtube.com/watch?v=4Ulrsb_MSFo&amp;list=PLGVZCDnMOq0qfJkoiFj-hN7lSHgQzXtqQ</a></p>\n\n<p>Here is a quick introduction to Machine Learning with Python\nPart 1\n<a href=\"https://www.youtube.com/watch?v=OB1reY6IX-o&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6&index=4\">https://www.youtube.com/watch?v=OB1reY6IX-o&amp;list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6&amp;index=4</a>\nPart 2\n<a href=\"https://www.youtube.com/watch?v=Cte8FYCpylk&index=18&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6\">https://www.youtube.com/watch?v=Cte8FYCpylk&amp;index=18&amp;list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6</a></p>\n\n<p>Subscribe to Enthought, PyData, NextDay video channels.</p>\n\n<p>Regards</p>",
      "rawMarkdown": "FelixZhao besides books I would highly recommend looking at PyCon (python general), SciPy (scientific python) and PyData (python Data Science) conferences. They provide video recordings of all of their sessions. Very helpful.\r\n\r\nSciPy 2016 https://www.youtube.com/playlist?list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6\r\nSciPy 2015 https://www.youtube.com/playlist?list=PLYx7XA2nY5Gcpabmu61kKcToLz0FapmHu\r\n\r\nPyData London 2016 https://www.youtube.com/watch?v=4Ulrsb_MSFo&list=PLGVZCDnMOq0qfJkoiFj-hN7lSHgQzXtqQ\r\n\r\nHere is a quick introduction to Machine Learning with Python\r\nPart 1\r\nhttps://www.youtube.com/watch?v=OB1reY6IX-o&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6&index=4\r\nPart 2\r\nhttps://www.youtube.com/watch?v=Cte8FYCpylk&index=18&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6\r\n\r\nSubscribe to Enthought, PyData, NextDay video channels.\r\n\r\nRegards",
      "votes": null
    },
    {
      "id": "132414",
      "postDate": "08/25/2016 10:35:43",
      "content": "<p>[quote=FelixZhao;132372]</p>\n\n<p>p.s to Tim: actually I always wanted to learn Python because it is considered faster than R, but it seems very challenging for me because I started my career as a Six Sigma Black Belt and is statistics guy and R seemed natural to me while Python seemed unintuitive. But I have decided to follow your advice to learn Python, especially numpy,pandas and sci-kit learn packages. Do you have any recommendations on books or any other online resources that you think is suitable for beginners like me?</p>\n\n<p>[/quote]</p>\n\n<p>Hi Felix, once you start spending some time with it you'll see it's actually much easier than R :). \nI personally started learning the basics with the udacity CS 101 course and then learned python for ML 'by kaggle'. The rest is continuous improvement on the job. \nIf I would start to learn it again, I'll probably choose learnpythonthehardway.org (heard from many people, including one Econ professor of mine, they had really good experiences with it).  After you developed a basic understanding of the language, turn to the excellent scikit-learn documentation. Also go through the scripts / kernels here on kaggle, download them and execute them line by line in an ipython notebook to really understand whats happening. Finally, build on those ideas and do your kaggle projects in python. </p>\n\n<p>Hope this helps</p>\n\n<p>Tim </p>",
      "rawMarkdown": "[quote=FelixZhao;132372]\r\n\r\np.s to Tim: actually I always wanted to learn Python because it is considered faster than R, but it seems very challenging for me because I started my career as a Six Sigma Black Belt and is statistics guy and R seemed natural to me while Python seemed unintuitive. But I have decided to follow your advice to learn Python, especially numpy,pandas and sci-kit learn packages. Do you have any recommendations on books or any other online resources that you think is suitable for beginners like me?\r\n\r\n[/quote]\r\n\r\nHi Felix, once you start spending some time with it you'll see it's actually much easier than R :). \r\nI personally started learning the basics with the udacity CS 101 course and then learned python for ML 'by kaggle'. The rest is continuous improvement on the job. \r\nIf I would start to learn it again, I'll probably choose learnpythonthehardway.org (heard from many people, including one Econ professor of mine, they had really good experiences with it).  After you developed a basic understanding of the language, turn to the excellent scikit-learn documentation. Also go through the scripts / kernels here on kaggle, download them and execute them line by line in an ipython notebook to really understand whats happening. Finally, build on those ideas and do your kaggle projects in python. \r\n\r\nHope this helps\r\n\r\nTim",
      "votes": null
    },
    {
      "id": "132525",
      "postDate": "08/26/2016 13:21:26",
      "content": "<p>I tried  to increase the memory for H2o using max_mem_size as above. Couldn't be successful </p>\n\n<p>Invalid maximum heap size: -Xmx7G</p>\n\n<p>================================================================================</p>\n\n<pre><code>&gt; h2oServer &lt;- h2o.init(nthreads = -1, max_mem_size = &quot;7G&quot;)\n\nH2O is not running yet, starting it now...\n\nNote:  In case of errors look at the following log files:\n    C:\\Users\\User\\AppData\\Local\\Temp\\RtmpKa7XEy/h2o_GNS313_started_from_r.out\n    C:\\Users\\User\\AppData\\Local\\Temp\\RtmpKa7XEy/h2o_GNS313_started_from_r.err\n\nError: Could not create the Java Virtual Machine.\nError: A fatal exception has occurred. Program will exit.\nInvalid maximum heap size: -Xmx7G\nThe specified size exceeds the maximum representable size.\n\nStarting H2O JVM and connecting: ............................................................ \n[1] &quot;localhost&quot;\n[1] 54321\n[1] TRUE\n[1] -1\n[1] &quot;Failed to connect to localhost port 54321: Connection refused&quot;\n[1] 127\nError in h2o.init(nthreads = -1, max_mem_size = &quot;7G&quot;) : \n  H2O failed to start, stopping execution.\nIn addition: Warning messages:\n1: In .h2o.startJar(nthreads = nthreads, max_memory = max_mem_size,  :\n  You have a 32-bit version of Java. H2O works best with 64-bit Java.\nPlease download the latest Java SE JDK 7 from the following URL:\nhttp://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html\n2: running command '&quot;C:\\Program Files (x86)\\Java\\jdk1.8.0_74\\bin\\java.exe&quot; -Xmx7G -version' had status 1 \n3: running command 'curl 'http://localhost:54321'' had status 127 \n</code></pre>",
      "rawMarkdown": "I tried  to increase the memory for H2o using max_mem_size as above. Couldn't be successful \r\n\r\nInvalid maximum heap size: -Xmx7G\r\n\r\n================================================================================\r\n\r\n    > h2oServer <- h2o.init(nthreads = -1, max_mem_size = \"7G\")\r\n    \r\n    H2O is not running yet, starting it now...\r\n    \r\n    Note:  In case of errors look at the following log files:\r\n        C:\\Users\\User\\AppData\\Local\\Temp\\RtmpKa7XEy/h2o_GNS313_started_from_r.out\r\n        C:\\Users\\User\\AppData\\Local\\Temp\\RtmpKa7XEy/h2o_GNS313_started_from_r.err\r\n    \r\n    Error: Could not create the Java Virtual Machine.\r\n    Error: A fatal exception has occurred. Program will exit.\r\n    Invalid maximum heap size: -Xmx7G\r\n    The specified size exceeds the maximum representable size.\r\n    \r\n    Starting H2O JVM and connecting: ............................................................ \r\n    [1] \"localhost\"\r\n    [1] 54321\r\n    [1] TRUE\r\n    [1] -1\r\n    [1] \"Failed to connect to localhost port 54321: Connection refused\"\r\n    [1] 127\r\n    Error in h2o.init(nthreads = -1, max_mem_size = \"7G\") : \r\n      H2O failed to start, stopping execution.\r\n    In addition: Warning messages:\r\n    1: In .h2o.startJar(nthreads = nthreads, max_memory = max_mem_size,  :\r\n      You have a 32-bit version of Java. H2O works best with 64-bit Java.\r\n    Please download the latest Java SE JDK 7 from the following URL:\r\n    http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html\r\n    2: running command '\"C:\\Program Files (x86)\\Java\\jdk1.8.0_74\\bin\\java.exe\" -Xmx7G -version' had status 1 \r\n    3: running command 'curl 'http://localhost:54321'' had status 127",
      "votes": null
    },
    {
      "id": "132527",
      "postDate": "08/26/2016 13:29:07",
      "content": "<p>When started <strong>default h2o</strong> its working but no use as space is less <strong>0.97GB</strong></p>\n\n<p>===========================================================</p>\n\n<pre><code>&gt; localH2O = h2o.init(ip = 'localhost', port = 54321)\n\nH2O is not running yet, starting it now...\n\nNote:  In case of errors look at the following log files:\n    C:\\Users\\User\\AppData\\Local\\Temp\\RtmpKa7XEy/h2o_GNS313_started_from_r.out\n    C:\\Users\\User\\AppData\\Local\\Temp\\RtmpKa7XEy/h2o_GNS313_started_from_r.err\n\njava version &quot;1.8.0_74&quot;\nJava(TM) SE Runtime Environment (build 1.8.0_74-b02)\nJava HotSpot(TM) Client VM (build 25.74-b02, mixed mode)\n\nStarting H2O JVM and connecting: . Connection successful!\n\nR is connected to the H2O cluster: \n    H2O cluster uptime:         2 seconds 827 milliseconds \n    H2O cluster version:        3.8.3.3 \n    H2O cluster name:           H2O_started_from_R_GNS313_sex025 \n    H2O cluster total nodes:    1 \n    H2O cluster total memory:   0.97 GB \n    H2O cluster total cores:    4 \n    H2O cluster allowed cores:  2 \n    H2O cluster healthy:        TRUE \n    H2O Connection ip:          localhost \n    H2O Connection port:        54321 \n    H2O Connection proxy:       NA \n    R Version:                  R version 3.3.0 (2016-05-03) \n</code></pre>",
      "rawMarkdown": "When started **default h2o** its working but no use as space is less **0.97GB**\r\n\r\n===========================================================\r\n\r\n    > localH2O = h2o.init(ip = 'localhost', port = 54321)\r\n    \r\n    H2O is not running yet, starting it now...\r\n    \r\n    Note:  In case of errors look at the following log files:\r\n        C:\\Users\\User\\AppData\\Local\\Temp\\RtmpKa7XEy/h2o_GNS313_started_from_r.out\r\n        C:\\Users\\User\\AppData\\Local\\Temp\\RtmpKa7XEy/h2o_GNS313_started_from_r.err\r\n    \r\n    java version \"1.8.0_74\"\r\n    Java(TM) SE Runtime Environment (build 1.8.0_74-b02)\r\n    Java HotSpot(TM) Client VM (build 25.74-b02, mixed mode)\r\n    \r\n    Starting H2O JVM and connecting: . Connection successful!\r\n    \r\n    R is connected to the H2O cluster: \r\n        H2O cluster uptime:         2 seconds 827 milliseconds \r\n        H2O cluster version:        3.8.3.3 \r\n        H2O cluster name:           H2O_started_from_R_GNS313_sex025 \r\n        H2O cluster total nodes:    1 \r\n        H2O cluster total memory:   0.97 GB \r\n        H2O cluster total cores:    4 \r\n        H2O cluster allowed cores:  2 \r\n        H2O cluster healthy:        TRUE \r\n        H2O Connection ip:          localhost \r\n        H2O Connection port:        54321 \r\n        H2O Connection proxy:       NA \r\n        R Version:                  R version 3.3.0 (2016-05-03)",
      "votes": null
    },
    {
      "id": "132530",
      "postDate": "08/26/2016 13:47:11",
      "content": "<p>[quote=Tim Kreienkamp;132414]</p>\n\n<p>Hi Felix, once you start spending some time with it you'll see it's actually much easier than R :). </p>\n\n<p>[/quote]</p>\n\n<p>It's not. It's just different. Both are awesome. Let's not go into the 'what is better, R or python' topic and start a programming language war (I know that was not your intention, Tim).</p>",
      "rawMarkdown": "[quote=Tim Kreienkamp;132414]\r\n\r\nHi Felix, once you start spending some time with it you'll see it's actually much easier than R :). \r\n\r\n[/quote]\r\n\r\nIt's not. It's just different. Both are awesome. Let's not go into the 'what is better, R or python' topic and start a programming language war (I know that was not your intention, Tim).",
      "votes": null
    },
    {
      "id": "132537",
      "postDate": "08/26/2016 15:28:20",
      "content": "<p>[quote=Sumegh Bhalshankar;132527]</p>\n\n<p>When started <strong>default h2o</strong> its working but no use as space is less <strong>0.97GB</strong></p>\n\n<p>[/quote]</p>\n\n<p>The verbose error print gave you all the elements to solve your issue. Step by step solving:</p>\n\n<blockquote>\n  <p>h2oServer &lt;- h2o.init(nthreads = -1, max_mem_size = &quot;7G&quot;)</p>\n</blockquote>\n\n<ol>\n<li>You are trying to use 7GB memory.</li>\n</ol>\n\n<blockquote>\n  <p>The specified size exceeds the maximum representable size.</p>\n</blockquote>\n\n<ol start=\"2\">\n<li>It exceeds the maximum size? Why?</li>\n</ol>\n\n<blockquote>\n  <p>You have a 32-bit version of Java. H2O works best with 64-bit Java.\n  Please download the latest Java SE JDK 7 from the following URL:\n  <a href=\"http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html\">http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html</a></p>\n</blockquote>\n\n<ol start=\"3\">\n<li>It tells you exactly what to do to solve this issue: download and use 64-bit Java.</li>\n</ol>",
      "rawMarkdown": "[quote=Sumegh Bhalshankar;132527]\r\n\r\nWhen started **default h2o** its working but no use as space is less **0.97GB**\r\n\r\n[/quote]\r\n\r\nThe verbose error print gave you all the elements to solve your issue. Step by step solving:\r\n\r\n> h2oServer <- h2o.init(nthreads = -1, max_mem_size = \"7G\")\r\n\r\n1. You are trying to use 7GB memory.\r\n\r\n> The specified size exceeds the maximum representable size.\r\n\r\n2. It exceeds the maximum size? Why?\r\n\r\n> You have a 32-bit version of Java. H2O works best with 64-bit Java.\r\nPlease download the latest Java SE JDK 7 from the following URL:\r\nhttp://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html\r\n\r\n3. It tells you exactly what to do to solve this issue: download and use 64-bit Java.",
      "votes": null
    },
    {
      "id": "132621",
      "postDate": "08/27/2016 14:25:44",
      "content": "",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 132318,
      "author_name": "timkreienkamp",
      "author_url": "",
      "post_date": "08/24/2016 14:18:33",
      "content": "<p>Hi Felix, </p>\n\n<p>generally I would recommend you to invest some time to learn python. It usually works smoother with larger datasets, has a much cleaner syntax, and (imho) a better developed framework at least for common supervised machine learning tasks (sci-kit learn). It might take some time to get you started, but it will definitely make you a better data analyst (and kaggler).  </p>\n\n<p>Your question was about R though ;). I would start off with the numerical features only, that's about two gigs which you should be able to read into R using the fread function from the data.table package ( the base R read.csv function is usually too slow for datasets this size). Once you have your data in R, I would recommend you have a look at the h2o package, that acts basically as an interface to a JVM (java virtual machine) and handles larger datasets much better. If you have medium memory (8-16 GB) you should be fine. If you have much less, you can still subsample the data in R and train a few models on the subsample. Then if you developed some ideas, you can scale them up using AWS (there are some tutorials on the web which make it really easy to install RStudio Server on an EC2 instance).</p>\n\n<p>Hope this helps, </p>\n\n<p>Tim </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 132330,
      "author_name": "tunguz",
      "author_url": "",
      "post_date": "08/24/2016 15:53:32",
      "content": "<p>Another option might be renting an online computing resource (AWS, Google Cloud, Azure). You could probably get a pretty good rate, especially if you are just interested in using it for a few hours to explore and subsample the data. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 132337,
      "author_name": "bguberfain",
      "author_url": "",
      "post_date": "08/24/2016 16:40:49",
      "content": "<p>Well, for low memory consumption I'd suggest looking at <a href=\"https://github.com/JohnLangford/vowpal_wabbit\">Vowpal Wabbit</a>. I'm giving it a try, but yet didn't get any result.</p>\n\n<p>The only think you should do is to read the csv files from Kaggle and transform it to the VW format. You can do it as a stream of data using Python's <a href=\"https://docs.python.org/2/library/zipfile.html\">zipfile</a>, <a href=\"https://docs.python.org/2/library/gzip.html\">gzip</a> and <a href=\"https://docs.python.org/2/library/csv.html\">csv</a>. This way, the memory footprint is minimal (you probably can run it in a 4Gb machine).</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 132343,
      "author_name": "interesting",
      "author_url": "",
      "post_date": "08/24/2016 17:26:49",
      "content": "<p>Hello felix,</p>\n\n<p>I agree with suggestions above, yet if you still wish to sample the dataset and prototype on that subset with R you can still do so using fread from data.table library.</p>\n\n<p>Use nrow parameter to define number of rows to read and select parameter to define desired columns.</p>\n\n<p>Let me know if you need more assistence (I available @ nathanie at post dot bgu dot ac dot il)</p>\n\n<p>Nati</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 132346,
      "author_name": "nappon",
      "author_url": "",
      "post_date": "08/24/2016 18:23:26",
      "content": "<p>Hi Tim,\nI tried H2O </p>\n\n<pre><code>ptm &lt;- proc.time()\n</code></pre>\n\n<p>train_date &lt;- h2o.importFile(path=&quot;train_date.csv&quot;)\ntrain_categorical &lt;- h2o.importFile(path=&quot;train_categorical.csv&quot;)\ntrain_numeric &lt;- h2o.importFile(path=&quot;train_numeric.csv&quot;)\nproc.time() - ptm</p>\n\n<p>worked for some of the training data but then ran into java.lang.OutOfMemoryError, see below. Any suggestions how to fix that?</p>\n\n<p>Thanks</p>\n\n<p>Uwe</p>\n\n<blockquote>\n  <p>train_date &lt;- h2o.importFile(path=&quot;train_date.csv&quot;)\n    |==================================================                                                   |  50%</p>\n</blockquote>\n\n<p>DistributedException from /127.0.0.1:54321, caused by java.lang.OutOfMemoryError: Java heap space</p>\n\n<p>Error: DistributedException from /127.0.0.1:54321, caused by java.lang.OutOfMemoryError: Java heap space</p>\n\n<blockquote>\n  <p>train_categorical &lt;- h2o.importFile(path=&quot;train_categorical.csv&quot;)\n    |=====================================================================================================| 100%\n  train_numeric &lt;- h2o.importFile(path=&quot;train_numeric.csv&quot;)\n    |=====================================================================================================| 100%\n  proc.time() - ptm\n     user  system elapsed \n    2.943   0.181  75.119 </p>\n</blockquote>",
      "votes": null,
      "replies": []
    },
    {
      "id": 132349,
      "author_name": "nappon",
      "author_url": "",
      "post_date": "08/24/2016 18:30:15",
      "content": "<p>sorry for the messy formatting, my first post with code... </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 132351,
      "author_name": "nappon",
      "author_url": "",
      "post_date": "08/24/2016 18:43:29",
      "content": "<p>Well, seems like I found a solution, lets see if i manage to achieve a better formatting as well\nI increased the memory for H2o using <strong>max_mem_size</strong> <br>\nA character string specifying the maximum size, in bytes, of the memory allocation pool to H2O. This value must a multiple of 1024 greater than 2MB. Append the letter m or M to indicate megabytes, or g or G to indicate gigabytes. This value is only used when R starts H2O.</p>\n\n<pre><code>h2oServer &lt;- h2o.init(nthreads = -1, max_mem_size = &quot;7G&quot;)\nptm &lt;- proc.time()\ntrain_date &lt;- h2o.importFile(path=&quot;train_date.csv&quot;)\ntrain_categorical &lt;- h2o.importFile(path=&quot;train_categorical.csv&quot;)\ntrain_numeric &lt;- h2o.importFile(path=&quot;train_numeric.csv&quot;)\nproc.time() - ptm\n</code></pre>\n\n<p>H2O starts now with <strong>H2O cluster total memory:   6.22 GB</strong> \nAnd therefore I can read in the training data in no time</p>\n\n<p>user  system elapsed \n  3.857   0.208  80.088</p>\n\n<p>Using\nR version 3.3.1 (2016-06-21)\nPlatform: x86_64-apple-darwin13.4.0 (64-bit)\nRunning under: OS X 10.11.6 (El Capitan)</p>\n\n<p>Hopefully Felix has success as well!\nUwe</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 132372,
      "author_name": "felixzhao",
      "author_url": "",
      "post_date": "08/24/2016 23:46:29",
      "content": "<p>Thanks to Tim Kreienkamp&#65292;Bojan Tunguz&#65292;Bruno G. do Amaral&#65292;Nathaniel Shimoni&#65292;Uwe Sterr!\nYou guys have provided me with multiple options to work with data. I will give them a try and hopefully one of them can work for me.</p>\n\n<p>p.s to Tim: actually I always wanted to learn Python because it is considered faster than R, but it seems very challenging for me because I started my career as a Six Sigma Black Belt and is statistics guy and R seemed natural to me while Python seemed unintuitive. But I have decided to follow your advice to learn Python, especially numpy,pandas and sci-kit learn packages. Do you have any recommendations on books or any other online resources that you think is suitable for beginners like me?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 132399,
      "author_name": "sakvaua",
      "author_url": "",
      "post_date": "08/25/2016 06:15:44",
      "content": "<p>FelixZhao besides books I would highly recommend looking at PyCon (python general), SciPy (scientific python) and PyData (python Data Science) conferences. They provide video recordings of all of their sessions. Very helpful.</p>\n\n<p>SciPy 2016 <a href=\"https://www.youtube.com/playlist?list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6\">https://www.youtube.com/playlist?list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6</a>\nSciPy 2015 <a href=\"https://www.youtube.com/playlist?list=PLYx7XA2nY5Gcpabmu61kKcToLz0FapmHu\">https://www.youtube.com/playlist?list=PLYx7XA2nY5Gcpabmu61kKcToLz0FapmHu</a></p>\n\n<p>PyData London 2016 <a href=\"https://www.youtube.com/watch?v=4Ulrsb_MSFo&list=PLGVZCDnMOq0qfJkoiFj-hN7lSHgQzXtqQ\">https://www.youtube.com/watch?v=4Ulrsb_MSFo&amp;list=PLGVZCDnMOq0qfJkoiFj-hN7lSHgQzXtqQ</a></p>\n\n<p>Here is a quick introduction to Machine Learning with Python\nPart 1\n<a href=\"https://www.youtube.com/watch?v=OB1reY6IX-o&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6&index=4\">https://www.youtube.com/watch?v=OB1reY6IX-o&amp;list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6&amp;index=4</a>\nPart 2\n<a href=\"https://www.youtube.com/watch?v=Cte8FYCpylk&index=18&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6\">https://www.youtube.com/watch?v=Cte8FYCpylk&amp;index=18&amp;list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6</a></p>\n\n<p>Subscribe to Enthought, PyData, NextDay video channels.</p>\n\n<p>Regards</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 132414,
      "author_name": "timkreienkamp",
      "author_url": "",
      "post_date": "08/25/2016 10:35:43",
      "content": "<p>[quote=FelixZhao;132372]</p>\n\n<p>p.s to Tim: actually I always wanted to learn Python because it is considered faster than R, but it seems very challenging for me because I started my career as a Six Sigma Black Belt and is statistics guy and R seemed natural to me while Python seemed unintuitive. But I have decided to follow your advice to learn Python, especially numpy,pandas and sci-kit learn packages. Do you have any recommendations on books or any other online resources that you think is suitable for beginners like me?</p>\n\n<p>[/quote]</p>\n\n<p>Hi Felix, once you start spending some time with it you'll see it's actually much easier than R :). \nI personally started learning the basics with the udacity CS 101 course and then learned python for ML 'by kaggle'. The rest is continuous improvement on the job. \nIf I would start to learn it again, I'll probably choose learnpythonthehardway.org (heard from many people, including one Econ professor of mine, they had really good experiences with it).  After you developed a basic understanding of the language, turn to the excellent scikit-learn documentation. Also go through the scripts / kernels here on kaggle, download them and execute them line by line in an ipython notebook to really understand whats happening. Finally, build on those ideas and do your kaggle projects in python. </p>\n\n<p>Hope this helps</p>\n\n<p>Tim </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 132525,
      "author_name": "sumegh",
      "author_url": "",
      "post_date": "08/26/2016 13:21:26",
      "content": "<p>I tried  to increase the memory for H2o using max_mem_size as above. Couldn't be successful </p>\n\n<p>Invalid maximum heap size: -Xmx7G</p>\n\n<p>================================================================================</p>\n\n<pre><code>&gt; h2oServer &lt;- h2o.init(nthreads = -1, max_mem_size = &quot;7G&quot;)\n\nH2O is not running yet, starting it now...\n\nNote:  In case of errors look at the following log files:\n    C:\\Users\\User\\AppData\\Local\\Temp\\RtmpKa7XEy/h2o_GNS313_started_from_r.out\n    C:\\Users\\User\\AppData\\Local\\Temp\\RtmpKa7XEy/h2o_GNS313_started_from_r.err\n\nError: Could not create the Java Virtual Machine.\nError: A fatal exception has occurred. Program will exit.\nInvalid maximum heap size: -Xmx7G\nThe specified size exceeds the maximum representable size.\n\nStarting H2O JVM and connecting: ............................................................ \n[1] &quot;localhost&quot;\n[1] 54321\n[1] TRUE\n[1] -1\n[1] &quot;Failed to connect to localhost port 54321: Connection refused&quot;\n[1] 127\nError in h2o.init(nthreads = -1, max_mem_size = &quot;7G&quot;) : \n  H2O failed to start, stopping execution.\nIn addition: Warning messages:\n1: In .h2o.startJar(nthreads = nthreads, max_memory = max_mem_size,  :\n  You have a 32-bit version of Java. H2O works best with 64-bit Java.\nPlease download the latest Java SE JDK 7 from the following URL:\nhttp://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html\n2: running command '&quot;C:\\Program Files (x86)\\Java\\jdk1.8.0_74\\bin\\java.exe&quot; -Xmx7G -version' had status 1 \n3: running command 'curl 'http://localhost:54321'' had status 127 \n</code></pre>",
      "votes": null,
      "replies": []
    },
    {
      "id": 132527,
      "author_name": "sumegh",
      "author_url": "",
      "post_date": "08/26/2016 13:29:07",
      "content": "<p>When started <strong>default h2o</strong> its working but no use as space is less <strong>0.97GB</strong></p>\n\n<p>===========================================================</p>\n\n<pre><code>&gt; localH2O = h2o.init(ip = 'localhost', port = 54321)\n\nH2O is not running yet, starting it now...\n\nNote:  In case of errors look at the following log files:\n    C:\\Users\\User\\AppData\\Local\\Temp\\RtmpKa7XEy/h2o_GNS313_started_from_r.out\n    C:\\Users\\User\\AppData\\Local\\Temp\\RtmpKa7XEy/h2o_GNS313_started_from_r.err\n\njava version &quot;1.8.0_74&quot;\nJava(TM) SE Runtime Environment (build 1.8.0_74-b02)\nJava HotSpot(TM) Client VM (build 25.74-b02, mixed mode)\n\nStarting H2O JVM and connecting: . Connection successful!\n\nR is connected to the H2O cluster: \n    H2O cluster uptime:         2 seconds 827 milliseconds \n    H2O cluster version:        3.8.3.3 \n    H2O cluster name:           H2O_started_from_R_GNS313_sex025 \n    H2O cluster total nodes:    1 \n    H2O cluster total memory:   0.97 GB \n    H2O cluster total cores:    4 \n    H2O cluster allowed cores:  2 \n    H2O cluster healthy:        TRUE \n    H2O Connection ip:          localhost \n    H2O Connection port:        54321 \n    H2O Connection proxy:       NA \n    R Version:                  R version 3.3.0 (2016-05-03) \n</code></pre>",
      "votes": null,
      "replies": []
    },
    {
      "id": 132530,
      "author_name": "tobycheese",
      "author_url": "",
      "post_date": "08/26/2016 13:47:11",
      "content": "<p>[quote=Tim Kreienkamp;132414]</p>\n\n<p>Hi Felix, once you start spending some time with it you'll see it's actually much easier than R :). </p>\n\n<p>[/quote]</p>\n\n<p>It's not. It's just different. Both are awesome. Let's not go into the 'what is better, R or python' topic and start a programming language war (I know that was not your intention, Tim).</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 132537,
      "author_name": "laurae2",
      "author_url": "",
      "post_date": "08/26/2016 15:28:20",
      "content": "<p>[quote=Sumegh Bhalshankar;132527]</p>\n\n<p>When started <strong>default h2o</strong> its working but no use as space is less <strong>0.97GB</strong></p>\n\n<p>[/quote]</p>\n\n<p>The verbose error print gave you all the elements to solve your issue. Step by step solving:</p>\n\n<blockquote>\n  <p>h2oServer &lt;- h2o.init(nthreads = -1, max_mem_size = &quot;7G&quot;)</p>\n</blockquote>\n\n<ol>\n<li>You are trying to use 7GB memory.</li>\n</ol>\n\n<blockquote>\n  <p>The specified size exceeds the maximum representable size.</p>\n</blockquote>\n\n<ol start=\"2\">\n<li>It exceeds the maximum size? Why?</li>\n</ol>\n\n<blockquote>\n  <p>You have a 32-bit version of Java. H2O works best with 64-bit Java.\n  Please download the latest Java SE JDK 7 from the following URL:\n  <a href=\"http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html\">http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html</a></p>\n</blockquote>\n\n<ol start=\"3\">\n<li>It tells you exactly what to do to solve this issue: download and use 64-bit Java.</li>\n</ol>",
      "votes": null,
      "replies": []
    },
    {
      "id": 132621,
      "author_name": "bywing",
      "author_url": "",
      "post_date": "08/27/2016 14:25:44",
      "content": "",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "132313": "I am very interested in this competition because i work in manufacturing and is a data analyst. This is the first time i have seen a leading manufacturer in the world using machine learning to improve quality and this is definitively something that my company can learn from. \r\nThis competition shows that the manufacturing industry has extended their business excellence efforts from traditional Lean and Six Sigma methodologies to machine learning or predictive modeling.\r\nFor now, the biggest challenge for me is that i cannot find a computer that has big enough memory that can handle this big dataset. I am thinking using subsamples to for modeling but loading the dataset into R is already a challenge for me.\r\nI use nothing else but R.\r\nCan anyone provide any advice of loading maybe partial of the original dataset into R for modeling process?",
    "132318": "Hi Felix, \r\n\r\ngenerally I would recommend you to invest some time to learn python. It usually works smoother with larger datasets, has a much cleaner syntax, and (imho) a better developed framework at least for common supervised machine learning tasks (sci-kit learn). It might take some time to get you started, but it will definitely make you a better data analyst (and kaggler).  \r\n\r\nYour question was about R though ;). I would start off with the numerical features only, that's about two gigs which you should be able to read into R using the fread function from the data.table package ( the base R read.csv function is usually too slow for datasets this size). Once you have your data in R, I would recommend you have a look at the h2o package, that acts basically as an interface to a JVM (java virtual machine) and handles larger datasets much better. If you have medium memory (8-16 GB) you should be fine. If you have much less, you can still subsample the data in R and train a few models on the subsample. Then if you developed some ideas, you can scale them up using AWS (there are some tutorials on the web which make it really easy to install RStudio Server on an EC2 instance).\r\n\r\nHope this helps, \r\n\r\nTim",
    "132330": "Another option might be renting an online computing resource (AWS, Google Cloud, Azure). You could probably get a pretty good rate, especially if you are just interested in using it for a few hours to explore and subsample the data.",
    "132337": "Well, for low memory consumption I'd suggest looking at [Vowpal Wabbit](https://github.com/JohnLangford/vowpal_wabbit). I'm giving it a try, but yet didn't get any result.\r\n\r\nThe only think you should do is to read the csv files from Kaggle and transform it to the VW format. You can do it as a stream of data using Python's [zipfile](https://docs.python.org/2/library/zipfile.html), [gzip](https://docs.python.org/2/library/gzip.html) and [csv](https://docs.python.org/2/library/csv.html). This way, the memory footprint is minimal (you probably can run it in a 4Gb machine).",
    "132343": "Hello felix,\r\n\r\n\r\nI agree with suggestions above, yet if you still wish to sample the dataset and prototype on that subset with R you can still do so using fread from data.table library.\r\n\r\nUse nrow parameter to define number of rows to read and select parameter to define desired columns.\r\n\r\nLet me know if you need more assistence (I available @ nathanie at post dot bgu dot ac dot il)\r\n\r\nNati",
    "132346": "Hi Tim,\r\nI tried H2O \r\n\r\n    ptm <- proc.time()\r\ntrain_date <- h2o.importFile(path=\"train_date.csv\")\r\ntrain_categorical <- h2o.importFile(path=\"train_categorical.csv\")\r\ntrain_numeric <- h2o.importFile(path=\"train_numeric.csv\")\r\nproc.time() - ptm\r\n\r\nworked for some of the training data but then ran into java.lang.OutOfMemoryError, see below. Any suggestions how to fix that?\r\n\r\nThanks\r\n\r\nUwe\r\n\r\n> train_date <- h2o.importFile(path=\"train_date.csv\")\r\n  |==================================================                                                   |  50%\r\n\r\nDistributedException from /127.0.0.1:54321, caused by java.lang.OutOfMemoryError: Java heap space\r\n\r\nError: DistributedException from /127.0.0.1:54321, caused by java.lang.OutOfMemoryError: Java heap space\r\n> train_categorical <- h2o.importFile(path=\"train_categorical.csv\")\r\n  |=====================================================================================================| 100%\r\n> train_numeric <- h2o.importFile(path=\"train_numeric.csv\")\r\n  |=====================================================================================================| 100%\r\n> proc.time() - ptm\r\n   user  system elapsed \r\n  2.943   0.181  75.119",
    "132349": "sorry for the messy formatting, my first post with code...",
    "132351": "Well, seems like I found a solution, lets see if i manage to achieve a better formatting as well\r\nI increased the memory for H2o using **max_mem_size**\t\r\nA character string specifying the maximum size, in bytes, of the memory allocation pool to H2O. This value must a multiple of 1024 greater than 2MB. Append the letter m or M to indicate megabytes, or g or G to indicate gigabytes. This value is only used when R starts H2O.\r\n\r\n    h2oServer <- h2o.init(nthreads = -1, max_mem_size = \"7G\")\r\n    ptm <- proc.time()\r\n    train_date <- h2o.importFile(path=\"train_date.csv\")\r\n    train_categorical <- h2o.importFile(path=\"train_categorical.csv\")\r\n    train_numeric <- h2o.importFile(path=\"train_numeric.csv\")\r\n    proc.time() - ptm\r\n\r\nH2O starts now with **H2O cluster total memory:   6.22 GB** \r\nAnd therefore I can read in the training data in no time\r\n\r\n   user  system elapsed \r\n  3.857   0.208  80.088\r\n\r\nUsing\r\nR version 3.3.1 (2016-06-21)\r\nPlatform: x86_64-apple-darwin13.4.0 (64-bit)\r\nRunning under: OS X 10.11.6 (El Capitan)\r\n\r\nHopefully Felix has success as well!\r\nUwe",
    "132372": "Thanks to Tim Kreienkamp，Bojan Tunguz，Bruno G. do Amaral，Nathaniel Shimoni，Uwe Sterr!\r\nYou guys have provided me with multiple options to work with data. I will give them a try and hopefully one of them can work for me.\r\n\r\np.s to Tim: actually I always wanted to learn Python because it is considered faster than R, but it seems very challenging for me because I started my career as a Six Sigma Black Belt and is statistics guy and R seemed natural to me while Python seemed unintuitive. But I have decided to follow your advice to learn Python, especially numpy,pandas and sci-kit learn packages. Do you have any recommendations on books or any other online resources that you think is suitable for beginners like me?",
    "132399": "FelixZhao besides books I would highly recommend looking at PyCon (python general), SciPy (scientific python) and PyData (python Data Science) conferences. They provide video recordings of all of their sessions. Very helpful.\r\n\r\nSciPy 2016 https://www.youtube.com/playlist?list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6\r\nSciPy 2015 https://www.youtube.com/playlist?list=PLYx7XA2nY5Gcpabmu61kKcToLz0FapmHu\r\n\r\nPyData London 2016 https://www.youtube.com/watch?v=4Ulrsb_MSFo&list=PLGVZCDnMOq0qfJkoiFj-hN7lSHgQzXtqQ\r\n\r\nHere is a quick introduction to Machine Learning with Python\r\nPart 1\r\nhttps://www.youtube.com/watch?v=OB1reY6IX-o&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6&index=4\r\nPart 2\r\nhttps://www.youtube.com/watch?v=Cte8FYCpylk&index=18&list=PLYx7XA2nY5Gf37zYZMw6OqGFRPjB1jCy6\r\n\r\nSubscribe to Enthought, PyData, NextDay video channels.\r\n\r\nRegards",
    "132414": "[quote=FelixZhao;132372]\r\n\r\np.s to Tim: actually I always wanted to learn Python because it is considered faster than R, but it seems very challenging for me because I started my career as a Six Sigma Black Belt and is statistics guy and R seemed natural to me while Python seemed unintuitive. But I have decided to follow your advice to learn Python, especially numpy,pandas and sci-kit learn packages. Do you have any recommendations on books or any other online resources that you think is suitable for beginners like me?\r\n\r\n[/quote]\r\n\r\nHi Felix, once you start spending some time with it you'll see it's actually much easier than R :). \r\nI personally started learning the basics with the udacity CS 101 course and then learned python for ML 'by kaggle'. The rest is continuous improvement on the job. \r\nIf I would start to learn it again, I'll probably choose learnpythonthehardway.org (heard from many people, including one Econ professor of mine, they had really good experiences with it).  After you developed a basic understanding of the language, turn to the excellent scikit-learn documentation. Also go through the scripts / kernels here on kaggle, download them and execute them line by line in an ipython notebook to really understand whats happening. Finally, build on those ideas and do your kaggle projects in python. \r\n\r\nHope this helps\r\n\r\nTim",
    "132525": "I tried  to increase the memory for H2o using max_mem_size as above. Couldn't be successful \r\n\r\nInvalid maximum heap size: -Xmx7G\r\n\r\n================================================================================\r\n\r\n    > h2oServer <- h2o.init(nthreads = -1, max_mem_size = \"7G\")\r\n    \r\n    H2O is not running yet, starting it now...\r\n    \r\n    Note:  In case of errors look at the following log files:\r\n        C:\\Users\\User\\AppData\\Local\\Temp\\RtmpKa7XEy/h2o_GNS313_started_from_r.out\r\n        C:\\Users\\User\\AppData\\Local\\Temp\\RtmpKa7XEy/h2o_GNS313_started_from_r.err\r\n    \r\n    Error: Could not create the Java Virtual Machine.\r\n    Error: A fatal exception has occurred. Program will exit.\r\n    Invalid maximum heap size: -Xmx7G\r\n    The specified size exceeds the maximum representable size.\r\n    \r\n    Starting H2O JVM and connecting: ............................................................ \r\n    [1] \"localhost\"\r\n    [1] 54321\r\n    [1] TRUE\r\n    [1] -1\r\n    [1] \"Failed to connect to localhost port 54321: Connection refused\"\r\n    [1] 127\r\n    Error in h2o.init(nthreads = -1, max_mem_size = \"7G\") : \r\n      H2O failed to start, stopping execution.\r\n    In addition: Warning messages:\r\n    1: In .h2o.startJar(nthreads = nthreads, max_memory = max_mem_size,  :\r\n      You have a 32-bit version of Java. H2O works best with 64-bit Java.\r\n    Please download the latest Java SE JDK 7 from the following URL:\r\n    http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html\r\n    2: running command '\"C:\\Program Files (x86)\\Java\\jdk1.8.0_74\\bin\\java.exe\" -Xmx7G -version' had status 1 \r\n    3: running command 'curl 'http://localhost:54321'' had status 127",
    "132527": "When started **default h2o** its working but no use as space is less **0.97GB**\r\n\r\n===========================================================\r\n\r\n    > localH2O = h2o.init(ip = 'localhost', port = 54321)\r\n    \r\n    H2O is not running yet, starting it now...\r\n    \r\n    Note:  In case of errors look at the following log files:\r\n        C:\\Users\\User\\AppData\\Local\\Temp\\RtmpKa7XEy/h2o_GNS313_started_from_r.out\r\n        C:\\Users\\User\\AppData\\Local\\Temp\\RtmpKa7XEy/h2o_GNS313_started_from_r.err\r\n    \r\n    java version \"1.8.0_74\"\r\n    Java(TM) SE Runtime Environment (build 1.8.0_74-b02)\r\n    Java HotSpot(TM) Client VM (build 25.74-b02, mixed mode)\r\n    \r\n    Starting H2O JVM and connecting: . Connection successful!\r\n    \r\n    R is connected to the H2O cluster: \r\n        H2O cluster uptime:         2 seconds 827 milliseconds \r\n        H2O cluster version:        3.8.3.3 \r\n        H2O cluster name:           H2O_started_from_R_GNS313_sex025 \r\n        H2O cluster total nodes:    1 \r\n        H2O cluster total memory:   0.97 GB \r\n        H2O cluster total cores:    4 \r\n        H2O cluster allowed cores:  2 \r\n        H2O cluster healthy:        TRUE \r\n        H2O Connection ip:          localhost \r\n        H2O Connection port:        54321 \r\n        H2O Connection proxy:       NA \r\n        R Version:                  R version 3.3.0 (2016-05-03)",
    "132530": "[quote=Tim Kreienkamp;132414]\r\n\r\nHi Felix, once you start spending some time with it you'll see it's actually much easier than R :). \r\n\r\n[/quote]\r\n\r\nIt's not. It's just different. Both are awesome. Let's not go into the 'what is better, R or python' topic and start a programming language war (I know that was not your intention, Tim).",
    "132537": "[quote=Sumegh Bhalshankar;132527]\r\n\r\nWhen started **default h2o** its working but no use as space is less **0.97GB**\r\n\r\n[/quote]\r\n\r\nThe verbose error print gave you all the elements to solve your issue. Step by step solving:\r\n\r\n> h2oServer <- h2o.init(nthreads = -1, max_mem_size = \"7G\")\r\n\r\n1. You are trying to use 7GB memory.\r\n\r\n> The specified size exceeds the maximum representable size.\r\n\r\n2. It exceeds the maximum size? Why?\r\n\r\n> You have a 32-bit version of Java. H2O works best with 64-bit Java.\r\nPlease download the latest Java SE JDK 7 from the following URL:\r\nhttp://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html\r\n\r\n3. It tells you exactly what to do to solve this issue: download and use 64-bit Java.",
    "132621": ""
  },
  "source": "meta"
}