{
  "id": 10821,
  "title": "Beat the benchmark with H2O - LB 0.4033703",
  "url": "/competitions/avazu-ctr-prediction/discussion/10821",
  "author_name": "",
  "post_date": "2014-11-02T07:13:06.793Z",
  "votes": 11,
  "comment_count": 54,
  "views": 29277,
  "content": "<p>Here's starter R code that should get&nbsp;you to a decent LB score.</p>\n<p>It does some common-sense feature engineering (extract day/hour, turn integers into categoricals, and add interactions between categoricals, some of which probably doesn't matter much), then builds a simple&nbsp;model using H2O's distributed GBM, but you can use GLM, RF or Deep Learning as well. &nbsp;There's a validation step with training on days&nbsp;21-29&nbsp;and validation on the 30th day, then another model is trained on all 10 days and used for making predictions on the test set.</p>\n<p>Of course, while everything is done from R, the data resides inside the H2O cluster node(s)&nbsp;and scales on a distributed compute cluster, and everything is open source:</p>\n<p>https://github.com/0xdata/h2o/blob/master/R/examples/Kaggle/CTR.R</p>\n<p>LogLoss on training data: 0.392463<br> LogLoss on validation data: 0.4027492<br> LB: 0.4033703</p>\n<p>Note: I'm not exactly sure how much memory you'll need but I'd think that you need at least 32GB, and even then there might be some swapping of unused data frames to disk from time to time. &nbsp;Probably best to use -Xmx128GB (or reduce the interaction features).</p>\n<p>Note: You'll need version 1597 (http://s3.amazonaws.com/h2o-release/h2o/master/1597/index.html)&nbsp;or later.</p>\n<p>NEW: Extensive&nbsp;training material&nbsp;at http://learn.h2o.ai with datasets and scripts at http://data.h2o.ai</p>\n<p>More info at:&nbsp;http://h2o.ai @hexadata https://twitter.com/ArnoCandel</p>\n<p>For Deep Learning, there's a R Vignette at&nbsp;https://t.co/kWzyFMGJ2S</p>\n<p>Also see these links for other Kaggle&nbsp;code:</p>\n<p>http://www.kaggle.com/c/tradeshift-text-classification/forums/t/10665/beat-the-benchmark-with-h2o-distributed-random-forest</p>\n<p>https://www.kaggle.com/c/afsis-soil-properties/forums/t/10568/ensemble-deep-learning-from-r-with-h2o-starter-kit</p>\n<p>Thanks, and good luck improving on this - Please let me know if it works for you!<br>Arno</p>",
  "messages": [
    {
      "id": "57179",
      "postDate": "11/02/2014 07:13:06",
      "content": "<p>Here's starter R code that should get&nbsp;you to a decent LB score.</p>\n<p>It does some common-sense feature engineering (extract day/hour, turn integers into categoricals, and add interactions between categoricals, some of which probably doesn't matter much), then builds a simple&nbsp;model using H2O's distributed GBM, but you can use GLM, RF or Deep Learning as well. &nbsp;There's a validation step with training on days&nbsp;21-29&nbsp;and validation on the 30th day, then another model is trained on all 10 days and used for making predictions on the test set.</p>\n<p>Of course, while everything is done from R, the data resides inside the H2O cluster node(s)&nbsp;and scales on a distributed compute cluster, and everything is open source:</p>\n<p>https://github.com/0xdata/h2o/blob/master/R/examples/Kaggle/CTR.R</p>\n<p>LogLoss on training data: 0.392463<br> LogLoss on validation data: 0.4027492<br> LB: 0.4033703</p>\n<p>Note: I'm not exactly sure how much memory you'll need but I'd think that you need at least 32GB, and even then there might be some swapping of unused data frames to disk from time to time. &nbsp;Probably best to use -Xmx128GB (or reduce the interaction features).</p>\n<p>Note: You'll need version 1597 (http://s3.amazonaws.com/h2o-release/h2o/master/1597/index.html)&nbsp;or later.</p>\n<p>NEW: Extensive&nbsp;training material&nbsp;at http://learn.h2o.ai with datasets and scripts at http://data.h2o.ai</p>\n<p>More info at:&nbsp;http://h2o.ai @hexadata https://twitter.com/ArnoCandel</p>\n<p>For Deep Learning, there's a R Vignette at&nbsp;https://t.co/kWzyFMGJ2S</p>\n<p>Also see these links for other Kaggle&nbsp;code:</p>\n<p>http://www.kaggle.com/c/tradeshift-text-classification/forums/t/10665/beat-the-benchmark-with-h2o-distributed-random-forest</p>\n<p>https://www.kaggle.com/c/afsis-soil-properties/forums/t/10568/ensemble-deep-learning-from-r-with-h2o-starter-kit</p>\n<p>Thanks, and good luck improving on this - Please let me know if it works for you!<br>Arno</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57185",
      "postDate": "11/02/2014 10:50:24",
      "content": "<p>Thanks again Arno,</p>\n<p>Really appreciate the 'tutorial' approach on real data for h2o.</p>\n<p>Something rather nice for engineering features for binary data.</p>\n<p>https://www.rochester.edu/college/psc/signorino/research/Carter_Signorino_2010_PA.pdf</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57189",
      "postDate": "11/02/2014 13:35:31",
      "content": "<p>[quote=Arno Candel;57179]</p>\n<p>Here's starter R code that should get&nbsp;you to a LB score of 0.393! &nbsp;Not sure whether there's a benchmark, but the title sounded good to me :)</p>\n\n<p>[/quote]</p>\n\n<p>I receive an error here:</p>\n<p>h2oServer &lt;- h2o.init(ip=&quot;mr-0xd2&quot;, port = 53322)</p>\n\n<p>Silly question I am sure...but do we need to run on our own ip address? If so, will this code run locally and require massive amount of memory?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57199",
      "postDate": "11/02/2014 17:28:54",
      "content": "<p>[quote=Inspector;57189]</p>\n<p>Silly question I am sure...but do we need to run on our own ip address? If so, will this code run locally and require massive amount of memory?</p>\n<p>[/quote]</p>\n<p>If you want to run the server in your computer you can simply type &quot;localhost&quot; and allocate a maximum amount of memory and number of cores when you start the h2o server like this:</p>\n<p>h2oServer &lt;- h2o.init(ip = &quot;localhost&quot;, port = 54321, max_mem_size = '5g', nthreads =&nbsp;4)</p>\n<p>don't forget to use the commands:&nbsp;h2o.ls() and&nbsp;h2o.rm() to keep h2o's server data size within the maximum memory limits otherwise you will get a server / memory error</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57202",
      "postDate": "11/02/2014 18:01:30",
      "content": "<p>[quote=wacax;57199]</p>\n<p>If you want to run the server in your computer you can simple type &quot;localhost&quot; and allocate a maximum amount of memory and number of cores when you start the h2o server like this:</p>\n<p>h2oServer &lt;- h2o.init(ip = &quot;localhost&quot;, port = 54321, max_mem_size = '5g', nthreads =&nbsp;4)</p>\n<p>don't forget to use the commands:&nbsp;h2o.ls() and&nbsp;h2o.rm() to keep h2o's server data size within the maximum memory limits otherwise you will get a server / memory error</p>\n<p>[/quote]</p>\n\n<p>Thank you. Do you just mean to use those commands as a general 'clean up' or do you need to somehow adjust the calls to the model function? Perhaps this is self evident if I knew more about H20 - if the algorithms can be used when the data is large relative to memory.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57207",
      "postDate": "11/02/2014 19:03:30",
      "content": "<p>Arno What was&nbsp;the wall time for training?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57212",
      "postDate": "11/02/2014 19:18:13",
      "content": "<p>[quote=Inspector;57202]</p>\n<p>Do you just mean to use those commands as a general 'clean up'&nbsp;</p>\n<p>[/quote]</p>\n<p>Yes, that precisely, I meant it as a general clean up. These commands are useful to list and remove files you will no longer need from the server.&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57215",
      "postDate": "11/02/2014 20:13:11",
      "content": "<p>wacax - thanks for helping out. &nbsp;Yes, you can launch H2O from within R, but I prefer to launch H2O myself on the server, as you have access to more options that way&nbsp;(e.g., you currently can't change the factor level limit default of 65k from R's h2o.init() function, but we will probably&nbsp;fix that soon):</p>\n\n<p>Inspector - I left a comment in the code&nbsp;that explains what to run on the server, it also tells you that you get access to a GUI via a web browser:</p>\n<p>## Connect to H2O server (On server(s), run 'java -jar h2o.jar -Xmx32G -port 53322 -name CTR -data_max_factor_levels 100000000' first)<br>## Go to http://server:53322/ to check Jobs/Data/Models etc.<br>h2oServer &lt;- h2o.init(ip=&quot;mr-0xd2&quot;, port = 53322)</p>\n\n<p>WeDontKnowWhatWeAreDoing - it took&nbsp;maybe 1&nbsp;hour (or less) on a 16-core server with -Xmx64G, but most time was spent in the factor-to-factor interaction terms, as they all become (materialized) new features of the enriched data set. &nbsp;If you enable feature importances (for RF, it's importances=T, you can later query them from the model or see a chart from the Web UI), then you can see how important those new features are, which is nice.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57221",
      "postDate": "11/03/2014 00:20:29",
      "content": "<p>Arno, awesome setup, thanks very much for passing it along! Thought I'd share this, obviously not as clutch as arno's full script but at the end you can solve the ID issue in the submission file by reading it in as character and then writing out with quote = F as follows:</p>\n<p><br>submission &lt;- read.csv(path_submission, colClasses = c(&quot;character&quot;))<br>submission[,2] &lt;- as.data.frame(pred)<br>colnames(submission) &lt;- c(&quot;id&quot;, &quot;click&quot;)<br>write.csv(as.data.frame(submission), file = paste(path,&quot;/data/submission.csv&quot;, sep = ''), quote = F, row.names = F)</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57224",
      "postDate": "11/03/2014 01:23:33",
      "content": "<p>Thanks Joe - I updated the script on github!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57299",
      "postDate": "11/04/2014 15:14:04",
      "content": "<p>Thanks Arno, it's looking good.</p>\n<p>I wonder if you can shed any light on this - I'm starting up directly in java, and trying to give it 64G or 128G (the server has 250G or so). &nbsp;When it starts, it reports&nbsp;Java heap maxMemory: 26.52 gb even though it recognises the full system RAM. &nbsp;When it is processing it seems to max out at about 30G RAM for the java process, and goes into swapping from time to time.</p>\n<p>I've had a couple of time-outs as well when it loses connection with httpd, and I've had to start from scratch, but so far I am up to 'Splitting into train/validation' and keeping fingers crossed!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57314",
      "postDate": "11/04/2014 19:29:10",
      "content": "<p>Jay -&nbsp;Please try to launch H2O via &quot;java -Xmx128g -ea&nbsp;-jar h2o.jar -name NAME -data_max_factor_levels 100000000 -baseport PORT&quot;, that should work, I use&nbsp;this all the time:</p>\n<p>R is connected to H2O cluster:<br> H2O cluster uptime: 6 seconds 387 milliseconds <br> H2O cluster version: 2.9.0.99999 <br> H2O cluster name: ArnoDemo <br> H2O cluster total nodes: 10 <br> H2O cluster total memory: 1137.78 GB <br> H2O cluster total cores: 320 <br> H2O cluster allowed cores: 320 <br> H2O cluster healthy: TRUE</p>\n<p>I usually&nbsp;launch R on (one of) the server node(s) itself (in a back-grounded 'screen' session), so that the REST call traffic takes less time, especially with so many factor levels (which all get sent back in JSON format from the server to R when the model is finished).</p>\n<p>Hope this helps,<br>Arno</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57332",
      "postDate": "11/05/2014 03:22:47",
      "content": "<p>Hi Arno,</p>\n<p>I'm running a locally with &lt;snip&gt;</p>\n<p><code>h2oServer &lt;- h2o.init(nthreads = 12, max_mem_size = '30G')</code></p>\n<p>I start running everything and get into the feature engineering phase, and then error.</p>\n<p>Feature engineering for factor columns.</p>\n<p><code></code><code>Error in &nbsp;.h2o__remoteSend(client, .h2o.__PAGE_EXEC2, str = expr)</code><code>&nbsp;</code></p>\n<p><code>&nbsp; http://127.0.0.1:54321/2/Exec2.json returned the following error:</code><code>&nbsp;</code></p>\n<p><code>&nbsp; &nbsp; Frame is already locked by job null.</code></p>\n<p>Any ideas?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57375",
      "postDate": "11/06/2014 03:47:15",
      "content": "<p>TechnoJunkie -</p>\n<p>Maybe it has to do with not starting H2O manually with -data_max_factor_levels 100000000 and some columns get parsed as&nbsp;all missing values (default limit of factor levels is 65k).</p>\n<p>You can you look at the log files from the browser:</p>\n<p>http://localhost:54321/LogView.html</p>\n<p>If you prefer, you can also download them there and send them to me (support@0xdata.com).</p>\n<p>This error message happens when an&nbsp;R expression fails and leaves some temporary vector in an invalid state. &nbsp;Our next version of H2O (h2o-dev) will have improved error reporting...</p>\n<p>Thanks,</p>\n<p>Arno</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57396",
      "postDate": "11/06/2014 10:52:50",
      "content": "<p>from where is the function h2o.interaction?</p>\n<p>I got the following message Error: could not find function &quot;h2o.interaction&quot;</p>\n<p>I can't find the function in the package.&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57431",
      "postDate": "11/06/2014 19:50:25",
      "content": "<p>Van de Rakt - You probably have to upgrade your H2O installation:</p>\n\n<p>devtools::install_github(&quot;woobe/deepr&quot;)<br>deepr::install_h2o()</p>\n\n<p>Should do the trick.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57459",
      "postDate": "11/07/2014 09:34:51",
      "content": "<p>-- this question was answered above.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57482",
      "postDate": "11/07/2014 19:13:58",
      "content": "<p>@Arno, thanks for the code. I am getting an error at following line:</p>\n<p>train_hex &lt;- h2o.addNewFeatures(train_hex, &quot;hour&quot;, intcols, factorcols, &quot;train_hex&quot;)</p>\n<p>## ERROR</p>\n<p>Error in .h2o.__remoteSend(client, .h2o.__PAGE_EXEC2, str = expr) : <br> http://localhost:54321/2/Exec2.json returned the following error:<br> Unknown var train_rev2.hex<br> Last.value.2 = train_rev2.hex[,c(3)]</p>\n\n<p>I think this is because of the class of train_hex namely H2OParsedData. It is not in usual data frame kind of thing to run a function.</p>\n<p>Can somebody help me with this.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57487",
      "postDate": "11/07/2014 20:23:25",
      "content": "<p>Ankit - I need to see more of your code. &nbsp;Did you make modifications? &nbsp;Does the original code that I posted work for you?</p>\n<p>The H2OParsedData object behaves very similarly to a regular data frame in R, but all the data is on the H2O server(s), and not in R.</p>\n<p>The error seems to suggest that train_hex wasn't found. &nbsp;Can you run summary(train_hex) before you call the addnewfeatures() call?</p>\n<p>You can also inspect the H2O in-memory store at&nbsp;http://localhost:54321/StoreView.html, or look at the Log (see my post above).</p>\n<p>Arno</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57489",
      "postDate": "11/07/2014 21:50:16",
      "content": "<p>Hey Arno,</p>\n<p>Thanks for the prompt reply. Appreciate it.</p>\n<p>I figured out the mistake. Initially&nbsp;I read the train, test files as they take a long time and saved the &nbsp;workspace in R. But when I load that workspace again in a different R session it seems that I have to read the files again to run anything even if they show up in the environment window in R studio.</p>\n<p>Also, I have follow up question. I am using the following parameters.</p>\n<p>h2oserver = h2o.init(ip = &quot;localhost&quot;, port = 54321, max_mem_size = '25g', nthreads = 12)</p>\n<p>However, my computer gets hanged even if I run the functions of feature engineering with the test data.</p>\n<p>Can you please suggest what is going on.&nbsp;</p>\n<p>Thanks for help again.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57490",
      "postDate": "11/07/2014 21:57:28",
      "content": "<p>Ankit - 25g might not be enough to avoid swapping, so it is probably just very slow trying to dump gigabytes to a directory in /tmp (default location&nbsp;of the '--ice_root' option in&nbsp;the java -jar startup command line). &nbsp;You can reduce the dataset size&nbsp;(see downsampling code below)&nbsp;or reduce the amount of feature engineering (fewer categorical interaction columns).</p>\n<p>random &lt;- h2o.runif(train_hex, seed = 123456789)<br>train_hex_downsampled &lt;- train_hex[random &lt; .1,]</p>\n\n<p>Arno</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57799",
      "postDate": "11/11/2014 14:40:06",
      "content": "<p>@Arno. Can you summarize the nature of the H2o algorithms in regards to memory use during model fit - does the data and processing have to fit within memory (like most functions in R) or will the models fit using a mini batch type of process? Basically asking if H2o allows training models on a laptop where the data set doesn't fit into memory? Thanks!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57900",
      "postDate": "11/12/2014 13:29:02",
      "content": "<p>I have a problem with reading the files correctly. More precisely, columns device_id and device_ip are read as NA. Anyone else experiencing the same problem?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57918",
      "postDate": "11/12/2014 15:36:38",
      "content": "<p>[quote=Matfyzak;57900]</p>\n<p>I have a problem with reading the files correctly. More precisely, columns device_id and device_ip are read as NA. Anyone else experiencing the same problem?</p>\n<p>[/quote]</p>\n\n<p>I am not sure, but it's possible no. of factor in device_id might be more than 65000. Default no. of factors to read in H2O is 65000. You can change it by starting H2O manually from command line. Refer to this</p>\n<p>http://www.kaggle.com/c/tradeshift-text-classification/forums/t/10665/beat-the-benchmark-with-h2o-distributed-random-forest &nbsp; 14th post&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57923",
      "postDate": "11/12/2014 16:36:23",
      "content": "<p>Well, I ran the code as suggested - not initiated H2O from R, but initiated the server first via</p>\n<p>java -Xmx32g -ea -jar h2o.jar -port 53322 -name CTR -data_max_factor_levels 100000000</p>\n<p>so the number of factors should not be an issue. H2O interprets columns&nbsp;device_id and device_ip as a numeric variable - there are hashes made just from numbers - and have problems switching to factor. However, I don't know why these two columns are a problem and others are not.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57943",
      "postDate": "11/12/2014 20:08:07",
      "content": "<p>Matfyzak</p>\n<p>Check these two things:</p>\n<p>1) You might&nbsp;have multiple&nbsp;instances of H2O running. &nbsp;I'd double-check the H2O cluster name on http://server:53322/Cloud.html, or, even better check what R reported when you did the h2o.init(ip=..., port=...) call. &nbsp;You can also kill all java processes to make sure nothing is running before you launch H2O.</p>\n<p>2) You need a new-enough version of H2O to pass the -data_max_factor_levels.</p>\n<p>Hope this helps,</p>\n<p>Arno</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "57988",
      "postDate": "11/13/2014 13:44:40",
      "content": "<p>Arno, thanks for suggestions. Unfortunately, the problem prevails.</p>\n<p>I have killed all Java processes, started H2O server and double checked that the H2O cluster name coincide with the one provided by h2o.init(ip=..., port=...). I have the newest stable version (Markov). Still no good for the two columns, others are fine.</p>\n<p>&nbsp;I run H2O locally (I initiate it with ip=&quot;127.0.0.1&quot;) and thus access it at http://localhost:53322/.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "58021",
      "postDate": "11/13/2014 18:34:31",
      "content": "<p>Markov just missed this feature. &nbsp;Please try this version:</p>\n<p>http://h2o-release.s3.amazonaws.com/h2o/rel-maxwell/2/index.html</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "58077",
      "postDate": "11/14/2014 15:22:43",
      "content": "<p>Thanks a lot, Arno! Now it works just fine. :)</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "58265",
      "postDate": "11/18/2014 03:07:54",
      "content": "<p>When I start the h2o server, I get memory related restriction errors ( is there free vs commercial versions ??) :</p>\n<p>Invalid maximum heap size: -Xmx12g<br>The specified size exceeds the maximum representable size.<br>Error: Could not create the Java Virtual Machine.<br>Error: A fatal exception has occurred. Program will exit.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "58266",
      "postDate": "11/18/2014 03:20:59",
      "content": "<p>saurk - that's likely a Java issue, has nothing to do with H2O. &nbsp;What version of java are you using? &nbsp;We recommend Oracle Java 1.7 or later.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "58267",
      "postDate": "11/18/2014 03:48:28",
      "content": "<p>I think the java version seems OK. Interestingly restricting it to 1 Gig works fine , i.e. &nbsp;&nbsp;-Xmx1g</p>\n<p>&gt;java -version<br>java version &quot;1.7.0_55&quot;<br>Java(TM) SE Runtime Environment (build 1.7.0_55-b30)<br>Java HotSpot(TM) Client VM (build 24.55-b03, mixed mode, sharing)</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "58269",
      "postDate": "11/18/2014 04:03:58",
      "content": "<p>Hi Arno,</p>\n<p>You were right. I switched my Java to Server edition and now it works fine !</p>\n<p>Thanks, Will try it out !</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "58598",
      "postDate": "11/21/2014 06:23:03",
      "content": "<p>Hi Arno,</p>\n\n<p>New data released and im trying to import via h2o, with bad results. &nbsp;The train dataset is forcing &quot;site_category&quot; to be NA for all values.</p>\n<p>str(train_hex)<br>Formal class 'H2OParsedData' [package &quot;h2o&quot;] with 7 slots<br> ..@ h2o :Formal class 'H2OClient' [package &quot;h2o&quot;] with 2 slots<br> .. .. ..@ ip : chr &quot;127.0.0.1&quot;<br> .. .. ..@ port: num 54321<br> ..@ key : chr &quot;train.hex&quot;<br> ..@ logic : logi FALSE<br> ..@ col_names: chr &quot;id&quot; &quot;click&quot; &quot;hour&quot; &quot;C1&quot; ...<br> ..@ nrows : num 40428967<br> ..@ ncols : num 24<br> ..@ any_enum : logi TRUE</p>\n<p>H2O dataset 'train.hex': 40428967 obs. of 24 variables:<br>$ id : num ...<br>$ click : num ...<br>$ hour : num ...<br>$ C1 : num ...<br>$ banner_pos : num ...<br>$ site_id : Factor w/ 4737 levels &quot;000aa1a4&quot;,&quot;00255fb4&quot;,..: ...<br>$ site_domain : Factor w/ 7745 levels &quot;000129ff&quot;,&quot;0035f25a&quot;,..: ...<br>$ site_category : num ...<br>$ app_id : Factor w/ 8552 levels &quot;000d6291&quot;,&quot;000f21f1&quot;,..: ...<br>$ app_domain : Factor w/ 559 levels &quot;001b87ae&quot;,&quot;002e4064&quot;,..: ...<br>$ app_category : Factor w/ 36 levels &quot;07d7df22&quot;,&quot;09481d60&quot;,..: ...<br>$ device_id : num ...<br>$ device_ip : num ...<br>$ device_model : Factor w/ 8251 levels &quot;00097428&quot;,&quot;0009f4d7&quot;,..: ...<br>$ device_type : num ...<br>$ device_conn_type: num ...<br>$ C14 : num ...<br>$ C15 : num ...<br>$ C16 : num ...<br>$ C17 : num ...<br>$ C18 : num ...<br>$ C19 : num ...<br>$ C20 : num ...<br>$ C21 : num ...</p>\n\n<p>I have no issues with importing the test dataset however</p>\n<p>H2O dataset 'test.hex': 4577464 obs. of 23 variables:<br>$ id : num ...<br>$ hour : num ...<br>$ C1 : num ...<br>$ banner_pos : num ...<br>$ site_id : Factor w/ 2825 levels &quot;00255fb4&quot;,&quot;003cf93d&quot;,..: ...<br>$ site_domain : Factor w/ 3366 levels &quot;0045caf0&quot;,&quot;005b495a&quot;,..: ...<br>$ site_category : Factor w/ 22 levels &quot;0569f928&quot;,&quot;28905ebd&quot;,..: ...<br>$ app_id : Factor w/ 3952 levels &quot;000d6291&quot;,&quot;00222d0c&quot;,..: ...<br>$ app_domain : Factor w/ 201 levels &quot;03da86e1&quot;,&quot;0654b444&quot;,..: ...<br>$ app_category : Factor w/ 28 levels &quot;07d7df22&quot;,&quot;09481d60&quot;,..: ...<br>$ device_id : num ...<br>$ device_ip : num ...<br>$ device_model : Factor w/ 5438 levels &quot;00097428&quot;,&quot;0009f4d7&quot;,..: ...<br>$ device_type : num ...<br>$ device_conn_type: num ...<br>$ C14 : num ...<br>$ C15 : num ...<br>$ C16 : num ...<br>$ C17 : num ...<br>$ C18 : num ...<br>$ C19 : num ...<br>$ C20 : num ...<br>$ C21 : num ...</p>\n<p>I've tried to use as.h2o as well to make sure the data is being imported correctly but end up with the same results.&nbsp;</p>\n<p>Any suggestions?</p>\n<p>H2O version 1594.</p>\n<p>Java 1.7</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "58637",
      "postDate": "11/21/2014 21:20:49",
      "content": "<p>TechnoJunkie - Have you tried specifying -data_max_factor_levels during the start&nbsp;from the&nbsp;command line?</p>\n<p>I'm currently working on updating the starter script to the new dataset, so stay tuned.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "58712",
      "postDate": "11/23/2014 02:59:24",
      "content": "<p>TechnoJunkie - More than 10% of values in&nbsp;the &quot;site_category&quot; column were actual numbers (such as 3e814130, arguably, with a huge exponent), and H2O converted the entire column into an int column.&nbsp;</p>\n<p>I've relaxed this 10% threshold to 25%, so the latest build (http://s3.amazonaws.com/h2o-release/h2o/master/1597/index.html or later) should work for you. &nbsp;Don't forget the -data_max_factor_levels for some of the other columns, of course.</p>\n<p>I'm still working on updating the script I provided above.</p>\n<p>Thanks,<br>Arno</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "58722",
      "postDate": "11/23/2014 08:59:09",
      "content": "<p>title of the post should be updated!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "58749",
      "postDate": "11/23/2014 22:40:45",
      "content": "<p>Hi, Arno!</p>\n<p>For me it seems a bit strange that you have validation score better then training.&nbsp;</p>\n<p>Is it true or just set names were mixed?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "58757",
      "postDate": "11/24/2014 00:58:44",
      "content": "<p>Updated the script linked in the first post. &nbsp;Our VPN is down, so I can't run anything until Monday or Tuesday. &nbsp;Would love to see what the accuracy is if anyone volunteers to run this script :)</p>\n<p>Thanks,<br>Arno</p>\n\n<p>PS. Note the new training material at http://learn.h2o.ai with datasets at http://s3.h2o.ai</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "58760",
      "postDate": "11/24/2014 02:47:55",
      "content": "<p>Hi Arno,</p>\n<p>I'll try i tomorrow on a 48g server, 16 cores.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "58773",
      "postDate": "11/24/2014 13:51:29",
      "content": "<p>So, neither 32g nor 48g are enough, it swaps to disk like crazy when building the interactions.</p>\n<p>I decided to drop the interactions piece, and am now running the code.</p>\n<p>Will report later with the results.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "59117",
      "postDate": "11/27/2014 20:56:10",
      "content": "<p>Just ran the current version (0b3f98855) of the R&nbsp;script with GBM bernoulli distribution, got</p>\n<p>LogLoss on training data: 0.392463<br> LogLoss on validation data: 0.4027492<br> LB: 0.4033703</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "59133",
      "postDate": "11/28/2014 04:19:16",
      "content": "<p>[quote=Arno Candel;59117]</p>\n<p>Just ran the current version (0b3f98855) of the R&nbsp;script with GBM bernoulli distribution, got</p>\n<p>LogLoss on training data: 0.392463<br> LogLoss on validation data: 0.4027492<br> LB: 0.4033703</p>\n<p>[/quote]</p>\n<p>the discrepancy between LB and validation remains high ...</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "59135",
      "postDate": "11/28/2014 04:35:44",
      "content": "<p>Hi Arno, &nbsp;Can we run the scripts across a cluster of 2 h2o servers with 32 GB each? Intending to try out on a cluster of 2 iMacs each with 32GB ram? &nbsp;Please advise. &nbsp;Thanks. &nbsp;Anyway to reduce the memory requirements further?&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "59139",
      "postDate": "11/28/2014 05:40:17",
      "content": "<p>Herimanitra - why do you think that? &nbsp;0.4027492 vs 0.4033703 isn't that far off... Note that it's not N-fold cross-validation, just a simple 90/10 split based on time.</p>\n\n<p>Patrick Chan - Yes, you can&nbsp;definitely try that. &nbsp;I also added some more h2o.rm() calls everywhere, so the latest version should be better already. &nbsp;To further reduce the memory footprint, you can comment out&nbsp;the&nbsp;feature engineering for integer and factor columns, and just leave the feature engineering for the time column. &nbsp;Interactions might not matter much to the tree-based methods anyway, since they come up with those on their own.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "59141",
      "postDate": "11/28/2014 06:10:33",
      "content": "<p>Sorry :) I was seeing 0.39xx</p>\n<p>[quote=Arno Candel;59139]</p>\n<p>Herimanitra - why do you think that? &nbsp;0.4027492 vs 0.4033703 isn't that far off... Note that it's not N-fold cross-validation, just a simple 90/10 split based on time.</p>\n<p>Patrick Chan - Yes, you can&nbsp;definitely try that. &nbsp;I also added some more h2o.rm() calls everywhere, so the latest version should be better already. &nbsp;To further reduce the memory footprint, you can comment out&nbsp;the&nbsp;feature engineering for integer and factor columns, and just leave the feature engineering for the time column. &nbsp;Interactions might not matter much to the tree-based methods anyway, since they come up with those on their own.</p>\n<p>[/quote]</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "59347",
      "postDate": "12/01/2014 18:18:14",
      "content": "<p>Hi,</p>\n<p>Have you some explanation about the h2o.interaction(), or relevant documentation ?</p>\n<p>It seems very interesting to know what is done in this step. I didn't find something important about it.</p>\n<p>The script is stoping at this step with error.</p>\n<p>Thanks to Arno.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "59349",
      "postDate": "12/01/2014 18:32:38",
      "content": "<p>khattab - you can find the description and&nbsp;example code with</p>\n<p>&gt; help(h2o.interaction)</p>\n<p>It's probably using up too much memory creating those interactions, so either disable it or use java -Xmx64g or more.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "59360",
      "postDate": "12/01/2014 22:04:56",
      "content": "<p>Hi, Arno</p>\n<p>Are there a way to do in h2o?:</p>\n<p>given two vectors obtain which are in first vector but not in the second vector</p>\n<p>(equivalent setdiff R function)</p>\n\n<p>And second question:</p>\n<p>Is possible to do a join of two h2oParsedData by a column or I need to send them to R?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "59362",
      "postDate": "12/01/2014 22:23:36",
      "content": "<p>Jose - No, both things are not currently possible in H2O, but are on the road map (for h2o-dev). &nbsp;You will need to do it in R for now.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62080",
      "postDate": "12/30/2014 04:14:40",
      "content": "<p>Hello everyone, <br>I have a question regarding the function h2o.kmeans. I am having trouble finding what centroids the training data were assigned to. In other words I cannot find the cluster assignments per observation</p>\n<p>According to the documentation found on: <a href=\"http://learn.h2o.ai/content/hands-on_training/kmeans_clustering.html\">http://learn.h2o.ai/content/hands-on_training/kmeans_clustering.html</a> and the examples in R this is the correct call:</p>\n<p><code>km.model &lt;- h2o.kmeans(data = iris.h2o, centers = 5, cols = 1:4, init=&quot;furthest&quot;)</code></p>\n<p><code></code><code>km.model@model$centers # centroids <br>km.model@model$tot.withinss # total within cluster sum of squares<br>km.model@model$cluster # cluster assignments per observation</code></p>\n<p>However these are the only components in&nbsp;km.model:</p>\n<p><code>Available components:</code></p>\n<p><code></code><code>[1] &quot;params&quot; &quot;centers&quot; &quot;withinss&quot; &quot;tot.withinss&quot; &quot;size&quot; &quot;iter&quot; </code></p>\n<p>and the component cluster is missing.</p>\n<p>printing:</p>\n<p>print(km.model@model$cluster)</p>\n<p>returns:</p>\n<p><code>NULL</code></p>\n<p>If anyone can help me find said component will be of great help to me. Matching the data to each centroid is not an option as the data is too large.</p>\n<p>PD: it'd be useful too if someone told me where I could find information about other h2o users that can help me, such as a mailing list, a tag in cross-validated or stack-overflow. I looked around but I couldn't find it.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62113",
      "postDate": "12/30/2014 21:48:23",
      "content": "<p><code>Works for me. What version of H2O are you using?</code></p>\n<p><code></code><code>&gt; library(h2o)<br>&gt; h2oServer =&nbsp;h2o.init(nthreads=-1)<br>Successfully connected to http://127.0.0.1:54321</code><code>R is connected to H2O cluster:<br> H2O cluster uptime: 6 seconds 568 milliseconds <br> H2O cluster version: 2.9.0.99999 <br> H2O cluster name: arno <br> H2O cluster total nodes: 1 <br> H2O cluster total memory: 7.11 GB <br> H2O cluster total cores: 8 <br> H2O cluster allowed cores: 8 <br> H2O cluster healthy: TRUE</code></p>\n<p><code>&gt; datadir =&nbsp;&quot;/data&quot;<br>&gt; homedir =&nbsp;file.path(datadir, &quot;h2o-training&quot;, &quot;clustering&quot;)<br>&gt; iris.h2o =&nbsp;as.h2o(h2oServer, iris)<br> |============================================================================================================================| 100%<br>&gt; <br>&gt; <br>&gt; ### Our first KMeans model<br>&gt; km.model =&nbsp;h2o.kmeans(data = iris.h2o, centers = 5, cols = 1:4, init=&quot;furthest&quot;)<br> |============================================================================================================================| 100%<br>&gt; ###### Let's look at the model summary:<br>&gt; km.model<br>IP Address: 127.0.0.1 <br>Port : 54321 <br>Parsed Data Key: Last.value.1</code><code>K-Means Model Key: KMeans2_a82272b2617c36ffce89426894944f90</code><code>K-means clustering with 5 clusters of sizes 50, 12, 39, 24, 25</code><code>Cluster means:<br> Sepal.Length Sepal.Width Petal.Length Petal.Width<br>1 5.006000 3.428000 1.462000 0.246000<br>2 7.475000 3.125000 6.300000 2.050000<br>3 6.207692 2.853846 4.746154 1.564103<br>4 6.529167 3.058333 5.508333 2.162500<br>5 5.508000 2.600000 3.908000 1.204000</code><code>Clustering vector:<br> Cluster ID<br> 0 :50 <br> 2 :39 <br> 4 :25 <br> 3 :24 <br> 1 :12</code><code>Within cluster sum of squares by cluster:<br>[1] 15.15100 4.65500 12.81128 5.46250 8.36640</code><code>Available components:</code><code>[1] &quot;params&quot; &quot;cluster&quot; &quot;centers&quot; &quot;withinss&quot; &quot;tot.withinss&quot; &quot;size&quot; &quot;iter&quot; <br>&gt; km.model@model$centers # The centers for each cluster<br> Sepal.Length Sepal.Width Petal.Length Petal.Width<br>1 5.006000 3.428000 1.462000 0.246000<br>2 7.475000 3.125000 6.300000 2.050000<br>3 6.207692 2.853846 4.746154 1.564103<br>4 6.529167 3.058333 5.508333 2.162500<br>5 5.508000 2.600000 3.908000 1.204000<br>&gt; km.model@model$tot.withinss # total within cluster sum of squares<br>[1] 46.44618<br>&gt; km.model@model$cluster # cluster assignments per observation<br>IP Address: 127.0.0.1 <br>Port : 54321 <br>Parsed Data Key: KMeans2_a82272b2617c36ffce89426894944f90_clusters</code><code>Cluster.ID<br>1 0<br>2 0<br>3 0<br>4 0<br>5 0<br>6 0</code><code>&gt; summary(km.model@model$cluster)<br> Cluster ID<br> 0 :50 <br> 2 :39 <br> 4 :25 <br> 3 :24 <br> 1 :12</code></p>\n<p><code>Also, you can use</code></p>\n<p>clusters.hex = h2o.predict(km.model,iris.h2o)</p>\n<p><code>to assign a centroid to each row of a given dataset (&quot;scoring&quot;). </code></p>\n<p><code>Note that clusters.hex will be stored in the H2O cluster, and is only 1 column, so that should be no problem in terms of memory footprint.</code></p>\n<p><code>H2O Forum:&nbsp;</code><code>https://groups.google.com/forum/#!forum/h2ostream</code></p>\n<p><code>More info:</code></p>\n<p><code>http://learn.h2o.ai and http://data.h2o.ai</code></p>\n<p><code>https://www.gitbook.com/@h2o</code></p>\n<p><code>http://www.slideshare.net/0xdata/presentations?order=popular</code></p>\n<p><code>http://docs.h2o.ai</code></p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62119",
      "postDate": "12/31/2014 04:44:55",
      "content": "<p>Thanks for the quick reply</p>\n<p>[quote=Arno Candel;62113]</p>\n<p><code>What version of H2O are you using?</code></p>\n<p>[/quote]</p>\n<p>I also tried updating to the newest version but I got the same result, it must be my computer's issue then. I am using: Package h2o version 2.9.0.1641</p>\n<p>this is the output I get from running the example<img src=\"http://i.imgur.com/P41quA7.png\" alt width=\"509\" height=\"192\"></p>\n<p>Still no trace of cluster. Neither in my example nor in the dataset I am trying to use kmeans on.</p>\n<p>[quote=Arno Candel;62113]</p>\n<p>Also, you can use</p>\n<p>clusters.hex = h2o.predict(km.model,iris.h2o)</p>\n<p>to assign a centroid to each row of a given dataset (&quot;scoring&quot;).&nbsp;</p>\n<p>[/quote]</p>\n<p>Yes, that is actually a better alternative since I could use a smaller (but significant) subset and then assign centroids to the whole dataset, This fixes my problem at hand.</p>\n<p>Thank you Arno for the answer and the links, you rock!</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62253",
      "postDate": "01/04/2015 07:21:04",
      "content": "<p>Hi Arno,</p>\n<p>I've just installed H2o and explored the web ui like here:<a href=\"https://www.youtube.com/watch?v=HzXoDbpm33E&list=PLNtMya54qvOFQhSZ4IKKXRbMkyLMn0caa&index=5\">https://www.youtube.com/watch?v=HzXoDbpm33E&amp;list=PLNtMya54qvOFQhSZ4IKKXRbMkyLMn0caa&amp;index=5</a></p>\n<p>Given the following information, does it mean that I'm bounded by 3,46gb of RAM when using h2o?</p>\n<p><code>10:08:53.705 main INFO WATER: Java heap totalMemory: 0,23 gb<br>10:08:53.706 main INFO WATER: <strong>Java heap maxMemory: 3,46 gb</strong><br>10:08:53.713 main INFO WATER: Java version: Java 1.8.0_25 (from Oracle Corporation)<br>10:08:53.713 main INFO WATER: OS version: Linux 3.13.0-43-generic (amd64)<br>10:08:53.938 main INFO WATER: Machine physical memory: 15,56 gb<br></code></p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "62254",
      "postDate": "01/04/2015 08:17:08",
      "content": "<p>Herimanitra - The default might only use 4GB, but you can launch H2O with, e.g.,&nbsp;&quot;java -Xmx14g -jar h2o.jar -ea -name MyH2O&quot;&nbsp;to allocate up to 14GB of heap memory for H2O on your 16GB machine.</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 57185,
      "author_name": "mpearmain",
      "author_url": "",
      "post_date": "11/02/2014 10:50:24",
      "content": "<p>Thanks again Arno,</p>\n<p>Really appreciate the 'tutorial' approach on real data for h2o.</p>\n<p>Something rather nice for engineering features for binary data.</p>\n<p>https://www.rochester.edu/college/psc/signorino/research/Carter_Signorino_2010_PA.pdf</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57189,
      "author_name": "inspector",
      "author_url": "",
      "post_date": "11/02/2014 13:35:31",
      "content": "<p>[quote=Arno Candel;57179]</p>\n<p>Here's starter R code that should get&nbsp;you to a LB score of 0.393! &nbsp;Not sure whether there's a benchmark, but the title sounded good to me :)</p>\n\n<p>[/quote]</p>\n\n<p>I receive an error here:</p>\n<p>h2oServer &lt;- h2o.init(ip=&quot;mr-0xd2&quot;, port = 53322)</p>\n\n<p>Silly question I am sure...but do we need to run on our own ip address? If so, will this code run locally and require massive amount of memory?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57199,
      "author_name": "wacaxx",
      "author_url": "",
      "post_date": "11/02/2014 17:28:54",
      "content": "<p>[quote=Inspector;57189]</p>\n<p>Silly question I am sure...but do we need to run on our own ip address? If so, will this code run locally and require massive amount of memory?</p>\n<p>[/quote]</p>\n<p>If you want to run the server in your computer you can simply type &quot;localhost&quot; and allocate a maximum amount of memory and number of cores when you start the h2o server like this:</p>\n<p>h2oServer &lt;- h2o.init(ip = &quot;localhost&quot;, port = 54321, max_mem_size = '5g', nthreads =&nbsp;4)</p>\n<p>don't forget to use the commands:&nbsp;h2o.ls() and&nbsp;h2o.rm() to keep h2o's server data size within the maximum memory limits otherwise you will get a server / memory error</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57202,
      "author_name": "inspector",
      "author_url": "",
      "post_date": "11/02/2014 18:01:30",
      "content": "<p>[quote=wacax;57199]</p>\n<p>If you want to run the server in your computer you can simple type &quot;localhost&quot; and allocate a maximum amount of memory and number of cores when you start the h2o server like this:</p>\n<p>h2oServer &lt;- h2o.init(ip = &quot;localhost&quot;, port = 54321, max_mem_size = '5g', nthreads =&nbsp;4)</p>\n<p>don't forget to use the commands:&nbsp;h2o.ls() and&nbsp;h2o.rm() to keep h2o's server data size within the maximum memory limits otherwise you will get a server / memory error</p>\n<p>[/quote]</p>\n\n<p>Thank you. Do you just mean to use those commands as a general 'clean up' or do you need to somehow adjust the calls to the model function? Perhaps this is self evident if I knew more about H20 - if the algorithms can be used when the data is large relative to memory.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57207,
      "author_name": "lapolonio",
      "author_url": "",
      "post_date": "11/02/2014 19:03:30",
      "content": "<p>Arno What was&nbsp;the wall time for training?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57212,
      "author_name": "wacaxx",
      "author_url": "",
      "post_date": "11/02/2014 19:18:13",
      "content": "<p>[quote=Inspector;57202]</p>\n<p>Do you just mean to use those commands as a general 'clean up'&nbsp;</p>\n<p>[/quote]</p>\n<p>Yes, that precisely, I meant it as a general clean up. These commands are useful to list and remove files you will no longer need from the server.&nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57215,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "11/02/2014 20:13:11",
      "content": "<p>wacax - thanks for helping out. &nbsp;Yes, you can launch H2O from within R, but I prefer to launch H2O myself on the server, as you have access to more options that way&nbsp;(e.g., you currently can't change the factor level limit default of 65k from R's h2o.init() function, but we will probably&nbsp;fix that soon):</p>\n\n<p>Inspector - I left a comment in the code&nbsp;that explains what to run on the server, it also tells you that you get access to a GUI via a web browser:</p>\n<p>## Connect to H2O server (On server(s), run 'java -jar h2o.jar -Xmx32G -port 53322 -name CTR -data_max_factor_levels 100000000' first)<br>## Go to http://server:53322/ to check Jobs/Data/Models etc.<br>h2oServer &lt;- h2o.init(ip=&quot;mr-0xd2&quot;, port = 53322)</p>\n\n<p>WeDontKnowWhatWeAreDoing - it took&nbsp;maybe 1&nbsp;hour (or less) on a 16-core server with -Xmx64G, but most time was spent in the factor-to-factor interaction terms, as they all become (materialized) new features of the enriched data set. &nbsp;If you enable feature importances (for RF, it's importances=T, you can later query them from the model or see a chart from the Web UI), then you can see how important those new features are, which is nice.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57221,
      "author_name": "joec33r",
      "author_url": "",
      "post_date": "11/03/2014 00:20:29",
      "content": "<p>Arno, awesome setup, thanks very much for passing it along! Thought I'd share this, obviously not as clutch as arno's full script but at the end you can solve the ID issue in the submission file by reading it in as character and then writing out with quote = F as follows:</p>\n<p><br>submission &lt;- read.csv(path_submission, colClasses = c(&quot;character&quot;))<br>submission[,2] &lt;- as.data.frame(pred)<br>colnames(submission) &lt;- c(&quot;id&quot;, &quot;click&quot;)<br>write.csv(as.data.frame(submission), file = paste(path,&quot;/data/submission.csv&quot;, sep = ''), quote = F, row.names = F)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57224,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "11/03/2014 01:23:33",
      "content": "<p>Thanks Joe - I updated the script on github!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57299,
      "author_name": "jaymoore",
      "author_url": "",
      "post_date": "11/04/2014 15:14:04",
      "content": "<p>Thanks Arno, it's looking good.</p>\n<p>I wonder if you can shed any light on this - I'm starting up directly in java, and trying to give it 64G or 128G (the server has 250G or so). &nbsp;When it starts, it reports&nbsp;Java heap maxMemory: 26.52 gb even though it recognises the full system RAM. &nbsp;When it is processing it seems to max out at about 30G RAM for the java process, and goes into swapping from time to time.</p>\n<p>I've had a couple of time-outs as well when it loses connection with httpd, and I've had to start from scratch, but so far I am up to 'Splitting into train/validation' and keeping fingers crossed!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57314,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "11/04/2014 19:29:10",
      "content": "<p>Jay -&nbsp;Please try to launch H2O via &quot;java -Xmx128g -ea&nbsp;-jar h2o.jar -name NAME -data_max_factor_levels 100000000 -baseport PORT&quot;, that should work, I use&nbsp;this all the time:</p>\n<p>R is connected to H2O cluster:<br> H2O cluster uptime: 6 seconds 387 milliseconds <br> H2O cluster version: 2.9.0.99999 <br> H2O cluster name: ArnoDemo <br> H2O cluster total nodes: 10 <br> H2O cluster total memory: 1137.78 GB <br> H2O cluster total cores: 320 <br> H2O cluster allowed cores: 320 <br> H2O cluster healthy: TRUE</p>\n<p>I usually&nbsp;launch R on (one of) the server node(s) itself (in a back-grounded 'screen' session), so that the REST call traffic takes less time, especially with so many factor levels (which all get sent back in JSON format from the server to R when the model is finished).</p>\n<p>Hope this helps,<br>Arno</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57332,
      "author_name": "mpearmain",
      "author_url": "",
      "post_date": "11/05/2014 03:22:47",
      "content": "<p>Hi Arno,</p>\n<p>I'm running a locally with &lt;snip&gt;</p>\n<p><code>h2oServer &lt;- h2o.init(nthreads = 12, max_mem_size = '30G')</code></p>\n<p>I start running everything and get into the feature engineering phase, and then error.</p>\n<p>Feature engineering for factor columns.</p>\n<p><code></code><code>Error in &nbsp;.h2o__remoteSend(client, .h2o.__PAGE_EXEC2, str = expr)</code><code>&nbsp;</code></p>\n<p><code>&nbsp; http://127.0.0.1:54321/2/Exec2.json returned the following error:</code><code>&nbsp;</code></p>\n<p><code>&nbsp; &nbsp; Frame is already locked by job null.</code></p>\n<p>Any ideas?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57375,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "11/06/2014 03:47:15",
      "content": "<p>TechnoJunkie -</p>\n<p>Maybe it has to do with not starting H2O manually with -data_max_factor_levels 100000000 and some columns get parsed as&nbsp;all missing values (default limit of factor levels is 65k).</p>\n<p>You can you look at the log files from the browser:</p>\n<p>http://localhost:54321/LogView.html</p>\n<p>If you prefer, you can also download them there and send them to me (support@0xdata.com).</p>\n<p>This error message happens when an&nbsp;R expression fails and leaves some temporary vector in an invalid state. &nbsp;Our next version of H2O (h2o-dev) will have improved error reporting...</p>\n<p>Thanks,</p>\n<p>Arno</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57396,
      "author_name": "vanderakt",
      "author_url": "",
      "post_date": "11/06/2014 10:52:50",
      "content": "<p>from where is the function h2o.interaction?</p>\n<p>I got the following message Error: could not find function &quot;h2o.interaction&quot;</p>\n<p>I can't find the function in the package.&nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57431,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "11/06/2014 19:50:25",
      "content": "<p>Van de Rakt - You probably have to upgrade your H2O installation:</p>\n\n<p>devtools::install_github(&quot;woobe/deepr&quot;)<br>deepr::install_h2o()</p>\n\n<p>Should do the trick.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57459,
      "author_name": "clintonboys",
      "author_url": "",
      "post_date": "11/07/2014 09:34:51",
      "content": "<p>-- this question was answered above.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57482,
      "author_name": "ankitj",
      "author_url": "",
      "post_date": "11/07/2014 19:13:58",
      "content": "<p>@Arno, thanks for the code. I am getting an error at following line:</p>\n<p>train_hex &lt;- h2o.addNewFeatures(train_hex, &quot;hour&quot;, intcols, factorcols, &quot;train_hex&quot;)</p>\n<p>## ERROR</p>\n<p>Error in .h2o.__remoteSend(client, .h2o.__PAGE_EXEC2, str = expr) : <br> http://localhost:54321/2/Exec2.json returned the following error:<br> Unknown var train_rev2.hex<br> Last.value.2 = train_rev2.hex[,c(3)]</p>\n\n<p>I think this is because of the class of train_hex namely H2OParsedData. It is not in usual data frame kind of thing to run a function.</p>\n<p>Can somebody help me with this.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57487,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "11/07/2014 20:23:25",
      "content": "<p>Ankit - I need to see more of your code. &nbsp;Did you make modifications? &nbsp;Does the original code that I posted work for you?</p>\n<p>The H2OParsedData object behaves very similarly to a regular data frame in R, but all the data is on the H2O server(s), and not in R.</p>\n<p>The error seems to suggest that train_hex wasn't found. &nbsp;Can you run summary(train_hex) before you call the addnewfeatures() call?</p>\n<p>You can also inspect the H2O in-memory store at&nbsp;http://localhost:54321/StoreView.html, or look at the Log (see my post above).</p>\n<p>Arno</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57489,
      "author_name": "ankitj",
      "author_url": "",
      "post_date": "11/07/2014 21:50:16",
      "content": "<p>Hey Arno,</p>\n<p>Thanks for the prompt reply. Appreciate it.</p>\n<p>I figured out the mistake. Initially&nbsp;I read the train, test files as they take a long time and saved the &nbsp;workspace in R. But when I load that workspace again in a different R session it seems that I have to read the files again to run anything even if they show up in the environment window in R studio.</p>\n<p>Also, I have follow up question. I am using the following parameters.</p>\n<p>h2oserver = h2o.init(ip = &quot;localhost&quot;, port = 54321, max_mem_size = '25g', nthreads = 12)</p>\n<p>However, my computer gets hanged even if I run the functions of feature engineering with the test data.</p>\n<p>Can you please suggest what is going on.&nbsp;</p>\n<p>Thanks for help again.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57490,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "11/07/2014 21:57:28",
      "content": "<p>Ankit - 25g might not be enough to avoid swapping, so it is probably just very slow trying to dump gigabytes to a directory in /tmp (default location&nbsp;of the '--ice_root' option in&nbsp;the java -jar startup command line). &nbsp;You can reduce the dataset size&nbsp;(see downsampling code below)&nbsp;or reduce the amount of feature engineering (fewer categorical interaction columns).</p>\n<p>random &lt;- h2o.runif(train_hex, seed = 123456789)<br>train_hex_downsampled &lt;- train_hex[random &lt; .1,]</p>\n\n<p>Arno</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57799,
      "author_name": "inspector",
      "author_url": "",
      "post_date": "11/11/2014 14:40:06",
      "content": "<p>@Arno. Can you summarize the nature of the H2o algorithms in regards to memory use during model fit - does the data and processing have to fit within memory (like most functions in R) or will the models fit using a mini batch type of process? Basically asking if H2o allows training models on a laptop where the data set doesn't fit into memory? Thanks!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57900,
      "author_name": "lukasdrapal",
      "author_url": "",
      "post_date": "11/12/2014 13:29:02",
      "content": "<p>I have a problem with reading the files correctly. More precisely, columns device_id and device_ip are read as NA. Anyone else experiencing the same problem?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57918,
      "author_name": "thakurrajanand",
      "author_url": "",
      "post_date": "11/12/2014 15:36:38",
      "content": "<p>[quote=Matfyzak;57900]</p>\n<p>I have a problem with reading the files correctly. More precisely, columns device_id and device_ip are read as NA. Anyone else experiencing the same problem?</p>\n<p>[/quote]</p>\n\n<p>I am not sure, but it's possible no. of factor in device_id might be more than 65000. Default no. of factors to read in H2O is 65000. You can change it by starting H2O manually from command line. Refer to this</p>\n<p>http://www.kaggle.com/c/tradeshift-text-classification/forums/t/10665/beat-the-benchmark-with-h2o-distributed-random-forest &nbsp; 14th post&nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57923,
      "author_name": "lukasdrapal",
      "author_url": "",
      "post_date": "11/12/2014 16:36:23",
      "content": "<p>Well, I ran the code as suggested - not initiated H2O from R, but initiated the server first via</p>\n<p>java -Xmx32g -ea -jar h2o.jar -port 53322 -name CTR -data_max_factor_levels 100000000</p>\n<p>so the number of factors should not be an issue. H2O interprets columns&nbsp;device_id and device_ip as a numeric variable - there are hashes made just from numbers - and have problems switching to factor. However, I don't know why these two columns are a problem and others are not.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57943,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "11/12/2014 20:08:07",
      "content": "<p>Matfyzak</p>\n<p>Check these two things:</p>\n<p>1) You might&nbsp;have multiple&nbsp;instances of H2O running. &nbsp;I'd double-check the H2O cluster name on http://server:53322/Cloud.html, or, even better check what R reported when you did the h2o.init(ip=..., port=...) call. &nbsp;You can also kill all java processes to make sure nothing is running before you launch H2O.</p>\n<p>2) You need a new-enough version of H2O to pass the -data_max_factor_levels.</p>\n<p>Hope this helps,</p>\n<p>Arno</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 57988,
      "author_name": "lukasdrapal",
      "author_url": "",
      "post_date": "11/13/2014 13:44:40",
      "content": "<p>Arno, thanks for suggestions. Unfortunately, the problem prevails.</p>\n<p>I have killed all Java processes, started H2O server and double checked that the H2O cluster name coincide with the one provided by h2o.init(ip=..., port=...). I have the newest stable version (Markov). Still no good for the two columns, others are fine.</p>\n<p>&nbsp;I run H2O locally (I initiate it with ip=&quot;127.0.0.1&quot;) and thus access it at http://localhost:53322/.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 58021,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "11/13/2014 18:34:31",
      "content": "<p>Markov just missed this feature. &nbsp;Please try this version:</p>\n<p>http://h2o-release.s3.amazonaws.com/h2o/rel-maxwell/2/index.html</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 58077,
      "author_name": "lukasdrapal",
      "author_url": "",
      "post_date": "11/14/2014 15:22:43",
      "content": "<p>Thanks a lot, Arno! Now it works just fine. :)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 58265,
      "author_name": "zsaurk",
      "author_url": "",
      "post_date": "11/18/2014 03:07:54",
      "content": "<p>When I start the h2o server, I get memory related restriction errors ( is there free vs commercial versions ??) :</p>\n<p>Invalid maximum heap size: -Xmx12g<br>The specified size exceeds the maximum representable size.<br>Error: Could not create the Java Virtual Machine.<br>Error: A fatal exception has occurred. Program will exit.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 58266,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "11/18/2014 03:20:59",
      "content": "<p>saurk - that's likely a Java issue, has nothing to do with H2O. &nbsp;What version of java are you using? &nbsp;We recommend Oracle Java 1.7 or later.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 58267,
      "author_name": "zsaurk",
      "author_url": "",
      "post_date": "11/18/2014 03:48:28",
      "content": "<p>I think the java version seems OK. Interestingly restricting it to 1 Gig works fine , i.e. &nbsp;&nbsp;-Xmx1g</p>\n<p>&gt;java -version<br>java version &quot;1.7.0_55&quot;<br>Java(TM) SE Runtime Environment (build 1.7.0_55-b30)<br>Java HotSpot(TM) Client VM (build 24.55-b03, mixed mode, sharing)</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 58269,
      "author_name": "zsaurk",
      "author_url": "",
      "post_date": "11/18/2014 04:03:58",
      "content": "<p>Hi Arno,</p>\n<p>You were right. I switched my Java to Server edition and now it works fine !</p>\n<p>Thanks, Will try it out !</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 58598,
      "author_name": "mpearmain",
      "author_url": "",
      "post_date": "11/21/2014 06:23:03",
      "content": "<p>Hi Arno,</p>\n\n<p>New data released and im trying to import via h2o, with bad results. &nbsp;The train dataset is forcing &quot;site_category&quot; to be NA for all values.</p>\n<p>str(train_hex)<br>Formal class 'H2OParsedData' [package &quot;h2o&quot;] with 7 slots<br> ..@ h2o :Formal class 'H2OClient' [package &quot;h2o&quot;] with 2 slots<br> .. .. ..@ ip : chr &quot;127.0.0.1&quot;<br> .. .. ..@ port: num 54321<br> ..@ key : chr &quot;train.hex&quot;<br> ..@ logic : logi FALSE<br> ..@ col_names: chr &quot;id&quot; &quot;click&quot; &quot;hour&quot; &quot;C1&quot; ...<br> ..@ nrows : num 40428967<br> ..@ ncols : num 24<br> ..@ any_enum : logi TRUE</p>\n<p>H2O dataset 'train.hex': 40428967 obs. of 24 variables:<br>$ id : num ...<br>$ click : num ...<br>$ hour : num ...<br>$ C1 : num ...<br>$ banner_pos : num ...<br>$ site_id : Factor w/ 4737 levels &quot;000aa1a4&quot;,&quot;00255fb4&quot;,..: ...<br>$ site_domain : Factor w/ 7745 levels &quot;000129ff&quot;,&quot;0035f25a&quot;,..: ...<br>$ site_category : num ...<br>$ app_id : Factor w/ 8552 levels &quot;000d6291&quot;,&quot;000f21f1&quot;,..: ...<br>$ app_domain : Factor w/ 559 levels &quot;001b87ae&quot;,&quot;002e4064&quot;,..: ...<br>$ app_category : Factor w/ 36 levels &quot;07d7df22&quot;,&quot;09481d60&quot;,..: ...<br>$ device_id : num ...<br>$ device_ip : num ...<br>$ device_model : Factor w/ 8251 levels &quot;00097428&quot;,&quot;0009f4d7&quot;,..: ...<br>$ device_type : num ...<br>$ device_conn_type: num ...<br>$ C14 : num ...<br>$ C15 : num ...<br>$ C16 : num ...<br>$ C17 : num ...<br>$ C18 : num ...<br>$ C19 : num ...<br>$ C20 : num ...<br>$ C21 : num ...</p>\n\n<p>I have no issues with importing the test dataset however</p>\n<p>H2O dataset 'test.hex': 4577464 obs. of 23 variables:<br>$ id : num ...<br>$ hour : num ...<br>$ C1 : num ...<br>$ banner_pos : num ...<br>$ site_id : Factor w/ 2825 levels &quot;00255fb4&quot;,&quot;003cf93d&quot;,..: ...<br>$ site_domain : Factor w/ 3366 levels &quot;0045caf0&quot;,&quot;005b495a&quot;,..: ...<br>$ site_category : Factor w/ 22 levels &quot;0569f928&quot;,&quot;28905ebd&quot;,..: ...<br>$ app_id : Factor w/ 3952 levels &quot;000d6291&quot;,&quot;00222d0c&quot;,..: ...<br>$ app_domain : Factor w/ 201 levels &quot;03da86e1&quot;,&quot;0654b444&quot;,..: ...<br>$ app_category : Factor w/ 28 levels &quot;07d7df22&quot;,&quot;09481d60&quot;,..: ...<br>$ device_id : num ...<br>$ device_ip : num ...<br>$ device_model : Factor w/ 5438 levels &quot;00097428&quot;,&quot;0009f4d7&quot;,..: ...<br>$ device_type : num ...<br>$ device_conn_type: num ...<br>$ C14 : num ...<br>$ C15 : num ...<br>$ C16 : num ...<br>$ C17 : num ...<br>$ C18 : num ...<br>$ C19 : num ...<br>$ C20 : num ...<br>$ C21 : num ...</p>\n<p>I've tried to use as.h2o as well to make sure the data is being imported correctly but end up with the same results.&nbsp;</p>\n<p>Any suggestions?</p>\n<p>H2O version 1594.</p>\n<p>Java 1.7</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 58637,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "11/21/2014 21:20:49",
      "content": "<p>TechnoJunkie - Have you tried specifying -data_max_factor_levels during the start&nbsp;from the&nbsp;command line?</p>\n<p>I'm currently working on updating the starter script to the new dataset, so stay tuned.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 58712,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "11/23/2014 02:59:24",
      "content": "<p>TechnoJunkie - More than 10% of values in&nbsp;the &quot;site_category&quot; column were actual numbers (such as 3e814130, arguably, with a huge exponent), and H2O converted the entire column into an int column.&nbsp;</p>\n<p>I've relaxed this 10% threshold to 25%, so the latest build (http://s3.amazonaws.com/h2o-release/h2o/master/1597/index.html or later) should work for you. &nbsp;Don't forget the -data_max_factor_levels for some of the other columns, of course.</p>\n<p>I'm still working on updating the script I provided above.</p>\n<p>Thanks,<br>Arno</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 58722,
      "author_name": "herimanitra",
      "author_url": "",
      "post_date": "11/23/2014 08:59:09",
      "content": "<p>title of the post should be updated!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 58749,
      "author_name": "mikhailtrofimov",
      "author_url": "",
      "post_date": "11/23/2014 22:40:45",
      "content": "<p>Hi, Arno!</p>\n<p>For me it seems a bit strange that you have validation score better then training.&nbsp;</p>\n<p>Is it true or just set names were mixed?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 58757,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "11/24/2014 00:58:44",
      "content": "<p>Updated the script linked in the first post. &nbsp;Our VPN is down, so I can't run anything until Monday or Tuesday. &nbsp;Would love to see what the accuracy is if anyone volunteers to run this script :)</p>\n<p>Thanks,<br>Arno</p>\n\n<p>PS. Note the new training material at http://learn.h2o.ai with datasets at http://s3.h2o.ai</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 58760,
      "author_name": "tanopereira",
      "author_url": "",
      "post_date": "11/24/2014 02:47:55",
      "content": "<p>Hi Arno,</p>\n<p>I'll try i tomorrow on a 48g server, 16 cores.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 58773,
      "author_name": "tanopereira",
      "author_url": "",
      "post_date": "11/24/2014 13:51:29",
      "content": "<p>So, neither 32g nor 48g are enough, it swaps to disk like crazy when building the interactions.</p>\n<p>I decided to drop the interactions piece, and am now running the code.</p>\n<p>Will report later with the results.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 59117,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "11/27/2014 20:56:10",
      "content": "<p>Just ran the current version (0b3f98855) of the R&nbsp;script with GBM bernoulli distribution, got</p>\n<p>LogLoss on training data: 0.392463<br> LogLoss on validation data: 0.4027492<br> LB: 0.4033703</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 59133,
      "author_name": "herimanitra",
      "author_url": "",
      "post_date": "11/28/2014 04:19:16",
      "content": "<p>[quote=Arno Candel;59117]</p>\n<p>Just ran the current version (0b3f98855) of the R&nbsp;script with GBM bernoulli distribution, got</p>\n<p>LogLoss on training data: 0.392463<br> LogLoss on validation data: 0.4027492<br> LB: 0.4033703</p>\n<p>[/quote]</p>\n<p>the discrepancy between LB and validation remains high ...</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 59135,
      "author_name": "drpatrickchan",
      "author_url": "",
      "post_date": "11/28/2014 04:35:44",
      "content": "<p>Hi Arno, &nbsp;Can we run the scripts across a cluster of 2 h2o servers with 32 GB each? Intending to try out on a cluster of 2 iMacs each with 32GB ram? &nbsp;Please advise. &nbsp;Thanks. &nbsp;Anyway to reduce the memory requirements further?&nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 59139,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "11/28/2014 05:40:17",
      "content": "<p>Herimanitra - why do you think that? &nbsp;0.4027492 vs 0.4033703 isn't that far off... Note that it's not N-fold cross-validation, just a simple 90/10 split based on time.</p>\n\n<p>Patrick Chan - Yes, you can&nbsp;definitely try that. &nbsp;I also added some more h2o.rm() calls everywhere, so the latest version should be better already. &nbsp;To further reduce the memory footprint, you can comment out&nbsp;the&nbsp;feature engineering for integer and factor columns, and just leave the feature engineering for the time column. &nbsp;Interactions might not matter much to the tree-based methods anyway, since they come up with those on their own.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 59141,
      "author_name": "herimanitra",
      "author_url": "",
      "post_date": "11/28/2014 06:10:33",
      "content": "<p>Sorry :) I was seeing 0.39xx</p>\n<p>[quote=Arno Candel;59139]</p>\n<p>Herimanitra - why do you think that? &nbsp;0.4027492 vs 0.4033703 isn't that far off... Note that it's not N-fold cross-validation, just a simple 90/10 split based on time.</p>\n<p>Patrick Chan - Yes, you can&nbsp;definitely try that. &nbsp;I also added some more h2o.rm() calls everywhere, so the latest version should be better already. &nbsp;To further reduce the memory footprint, you can comment out&nbsp;the&nbsp;feature engineering for integer and factor columns, and just leave the feature engineering for the time column. &nbsp;Interactions might not matter much to the tree-based methods anyway, since they come up with those on their own.</p>\n<p>[/quote]</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 59347,
      "author_name": "khattab34",
      "author_url": "",
      "post_date": "12/01/2014 18:18:14",
      "content": "<p>Hi,</p>\n<p>Have you some explanation about the h2o.interaction(), or relevant documentation ?</p>\n<p>It seems very interesting to know what is done in this step. I didn't find something important about it.</p>\n<p>The script is stoping at this step with error.</p>\n<p>Thanks to Arno.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 59349,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "12/01/2014 18:32:38",
      "content": "<p>khattab - you can find the description and&nbsp;example code with</p>\n<p>&gt; help(h2o.interaction)</p>\n<p>It's probably using up too much memory creating those interactions, so either disable it or use java -Xmx64g or more.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 59360,
      "author_name": "blindape",
      "author_url": "",
      "post_date": "12/01/2014 22:04:56",
      "content": "<p>Hi, Arno</p>\n<p>Are there a way to do in h2o?:</p>\n<p>given two vectors obtain which are in first vector but not in the second vector</p>\n<p>(equivalent setdiff R function)</p>\n\n<p>And second question:</p>\n<p>Is possible to do a join of two h2oParsedData by a column or I need to send them to R?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 59362,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "12/01/2014 22:23:36",
      "content": "<p>Jose - No, both things are not currently possible in H2O, but are on the road map (for h2o-dev). &nbsp;You will need to do it in R for now.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62080,
      "author_name": "wacaxx",
      "author_url": "",
      "post_date": "12/30/2014 04:14:40",
      "content": "<p>Hello everyone, <br>I have a question regarding the function h2o.kmeans. I am having trouble finding what centroids the training data were assigned to. In other words I cannot find the cluster assignments per observation</p>\n<p>According to the documentation found on: <a href=\"http://learn.h2o.ai/content/hands-on_training/kmeans_clustering.html\">http://learn.h2o.ai/content/hands-on_training/kmeans_clustering.html</a> and the examples in R this is the correct call:</p>\n<p><code>km.model &lt;- h2o.kmeans(data = iris.h2o, centers = 5, cols = 1:4, init=&quot;furthest&quot;)</code></p>\n<p><code></code><code>km.model@model$centers # centroids <br>km.model@model$tot.withinss # total within cluster sum of squares<br>km.model@model$cluster # cluster assignments per observation</code></p>\n<p>However these are the only components in&nbsp;km.model:</p>\n<p><code>Available components:</code></p>\n<p><code></code><code>[1] &quot;params&quot; &quot;centers&quot; &quot;withinss&quot; &quot;tot.withinss&quot; &quot;size&quot; &quot;iter&quot; </code></p>\n<p>and the component cluster is missing.</p>\n<p>printing:</p>\n<p>print(km.model@model$cluster)</p>\n<p>returns:</p>\n<p><code>NULL</code></p>\n<p>If anyone can help me find said component will be of great help to me. Matching the data to each centroid is not an option as the data is too large.</p>\n<p>PD: it'd be useful too if someone told me where I could find information about other h2o users that can help me, such as a mailing list, a tag in cross-validated or stack-overflow. I looked around but I couldn't find it.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62113,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "12/30/2014 21:48:23",
      "content": "<p><code>Works for me. What version of H2O are you using?</code></p>\n<p><code></code><code>&gt; library(h2o)<br>&gt; h2oServer =&nbsp;h2o.init(nthreads=-1)<br>Successfully connected to http://127.0.0.1:54321</code><code>R is connected to H2O cluster:<br> H2O cluster uptime: 6 seconds 568 milliseconds <br> H2O cluster version: 2.9.0.99999 <br> H2O cluster name: arno <br> H2O cluster total nodes: 1 <br> H2O cluster total memory: 7.11 GB <br> H2O cluster total cores: 8 <br> H2O cluster allowed cores: 8 <br> H2O cluster healthy: TRUE</code></p>\n<p><code>&gt; datadir =&nbsp;&quot;/data&quot;<br>&gt; homedir =&nbsp;file.path(datadir, &quot;h2o-training&quot;, &quot;clustering&quot;)<br>&gt; iris.h2o =&nbsp;as.h2o(h2oServer, iris)<br> |============================================================================================================================| 100%<br>&gt; <br>&gt; <br>&gt; ### Our first KMeans model<br>&gt; km.model =&nbsp;h2o.kmeans(data = iris.h2o, centers = 5, cols = 1:4, init=&quot;furthest&quot;)<br> |============================================================================================================================| 100%<br>&gt; ###### Let's look at the model summary:<br>&gt; km.model<br>IP Address: 127.0.0.1 <br>Port : 54321 <br>Parsed Data Key: Last.value.1</code><code>K-Means Model Key: KMeans2_a82272b2617c36ffce89426894944f90</code><code>K-means clustering with 5 clusters of sizes 50, 12, 39, 24, 25</code><code>Cluster means:<br> Sepal.Length Sepal.Width Petal.Length Petal.Width<br>1 5.006000 3.428000 1.462000 0.246000<br>2 7.475000 3.125000 6.300000 2.050000<br>3 6.207692 2.853846 4.746154 1.564103<br>4 6.529167 3.058333 5.508333 2.162500<br>5 5.508000 2.600000 3.908000 1.204000</code><code>Clustering vector:<br> Cluster ID<br> 0 :50 <br> 2 :39 <br> 4 :25 <br> 3 :24 <br> 1 :12</code><code>Within cluster sum of squares by cluster:<br>[1] 15.15100 4.65500 12.81128 5.46250 8.36640</code><code>Available components:</code><code>[1] &quot;params&quot; &quot;cluster&quot; &quot;centers&quot; &quot;withinss&quot; &quot;tot.withinss&quot; &quot;size&quot; &quot;iter&quot; <br>&gt; km.model@model$centers # The centers for each cluster<br> Sepal.Length Sepal.Width Petal.Length Petal.Width<br>1 5.006000 3.428000 1.462000 0.246000<br>2 7.475000 3.125000 6.300000 2.050000<br>3 6.207692 2.853846 4.746154 1.564103<br>4 6.529167 3.058333 5.508333 2.162500<br>5 5.508000 2.600000 3.908000 1.204000<br>&gt; km.model@model$tot.withinss # total within cluster sum of squares<br>[1] 46.44618<br>&gt; km.model@model$cluster # cluster assignments per observation<br>IP Address: 127.0.0.1 <br>Port : 54321 <br>Parsed Data Key: KMeans2_a82272b2617c36ffce89426894944f90_clusters</code><code>Cluster.ID<br>1 0<br>2 0<br>3 0<br>4 0<br>5 0<br>6 0</code><code>&gt; summary(km.model@model$cluster)<br> Cluster ID<br> 0 :50 <br> 2 :39 <br> 4 :25 <br> 3 :24 <br> 1 :12</code></p>\n<p><code>Also, you can use</code></p>\n<p>clusters.hex = h2o.predict(km.model,iris.h2o)</p>\n<p><code>to assign a centroid to each row of a given dataset (&quot;scoring&quot;). </code></p>\n<p><code>Note that clusters.hex will be stored in the H2O cluster, and is only 1 column, so that should be no problem in terms of memory footprint.</code></p>\n<p><code>H2O Forum:&nbsp;</code><code>https://groups.google.com/forum/#!forum/h2ostream</code></p>\n<p><code>More info:</code></p>\n<p><code>http://learn.h2o.ai and http://data.h2o.ai</code></p>\n<p><code>https://www.gitbook.com/@h2o</code></p>\n<p><code>http://www.slideshare.net/0xdata/presentations?order=popular</code></p>\n<p><code>http://docs.h2o.ai</code></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62119,
      "author_name": "wacaxx",
      "author_url": "",
      "post_date": "12/31/2014 04:44:55",
      "content": "<p>Thanks for the quick reply</p>\n<p>[quote=Arno Candel;62113]</p>\n<p><code>What version of H2O are you using?</code></p>\n<p>[/quote]</p>\n<p>I also tried updating to the newest version but I got the same result, it must be my computer's issue then. I am using: Package h2o version 2.9.0.1641</p>\n<p>this is the output I get from running the example<img src=\"http://i.imgur.com/P41quA7.png\" alt width=\"509\" height=\"192\"></p>\n<p>Still no trace of cluster. Neither in my example nor in the dataset I am trying to use kmeans on.</p>\n<p>[quote=Arno Candel;62113]</p>\n<p>Also, you can use</p>\n<p>clusters.hex = h2o.predict(km.model,iris.h2o)</p>\n<p>to assign a centroid to each row of a given dataset (&quot;scoring&quot;).&nbsp;</p>\n<p>[/quote]</p>\n<p>Yes, that is actually a better alternative since I could use a smaller (but significant) subset and then assign centroids to the whole dataset, This fixes my problem at hand.</p>\n<p>Thank you Arno for the answer and the links, you rock!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62253,
      "author_name": "herimanitra",
      "author_url": "",
      "post_date": "01/04/2015 07:21:04",
      "content": "<p>Hi Arno,</p>\n<p>I've just installed H2o and explored the web ui like here:<a href=\"https://www.youtube.com/watch?v=HzXoDbpm33E&list=PLNtMya54qvOFQhSZ4IKKXRbMkyLMn0caa&index=5\">https://www.youtube.com/watch?v=HzXoDbpm33E&amp;list=PLNtMya54qvOFQhSZ4IKKXRbMkyLMn0caa&amp;index=5</a></p>\n<p>Given the following information, does it mean that I'm bounded by 3,46gb of RAM when using h2o?</p>\n<p><code>10:08:53.705 main INFO WATER: Java heap totalMemory: 0,23 gb<br>10:08:53.706 main INFO WATER: <strong>Java heap maxMemory: 3,46 gb</strong><br>10:08:53.713 main INFO WATER: Java version: Java 1.8.0_25 (from Oracle Corporation)<br>10:08:53.713 main INFO WATER: OS version: Linux 3.13.0-43-generic (amd64)<br>10:08:53.938 main INFO WATER: Machine physical memory: 15,56 gb<br></code></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 62254,
      "author_name": "arnocandel",
      "author_url": "",
      "post_date": "01/04/2015 08:17:08",
      "content": "<p>Herimanitra - The default might only use 4GB, but you can launch H2O with, e.g.,&nbsp;&quot;java -Xmx14g -jar h2o.jar -ea -name MyH2O&quot;&nbsp;to allocate up to 14GB of heap memory for H2O on your 16GB machine.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "57179": "",
    "57185": "",
    "57189": "",
    "57199": "",
    "57202": "",
    "57207": "",
    "57212": "",
    "57215": "",
    "57221": "",
    "57224": "",
    "57299": "",
    "57314": "",
    "57332": "",
    "57375": "",
    "57396": "",
    "57431": "",
    "57459": "",
    "57482": "",
    "57487": "",
    "57489": "",
    "57490": "",
    "57799": "",
    "57900": "",
    "57918": "",
    "57923": "",
    "57943": "",
    "57988": "",
    "58021": "",
    "58077": "",
    "58265": "",
    "58266": "",
    "58267": "",
    "58269": "",
    "58598": "",
    "58637": "",
    "58712": "",
    "58722": "",
    "58749": "",
    "58757": "",
    "58760": "",
    "58773": "",
    "59117": "",
    "59133": "",
    "59135": "",
    "59139": "",
    "59141": "",
    "59347": "",
    "59349": "",
    "59360": "",
    "59362": "",
    "62080": "",
    "62113": "",
    "62119": "",
    "62253": "",
    "62254": ""
  },
  "source": "meta"
}