In [1]:
# Please download the iris.csv from
#https://raw.githubusercontent.com/vincentarelbundock/Rdatasets/master/csv/datasets/iris.csv and use it.
# replace C:/futuretext/iris.csv with your data location
library(h2o)
h2o.init(nthreads = -1)
train.hex <- h2o.importFile("../data/iris.csv")
splits <- h2o.splitFrame(train.hex, 0.75, seed=1234)
train.x <- setdiff(colnames(train.hex), c("Petal.Length","C1"))
train.y <- "Petal.Length"
dl <- h2o.deeplearning(x=train.x , y=train.y,
training_frame=splits[[1]],
distribution="quantile", quantile_alpha=0.8)
h2o.predict(dl, splits[[2]])


----------------------------------------------------------------------

Your next step is to start H2O:
    > h2o.init()

For H2O package documentation, ask for help:
    > ??h2o

After starting H2O, you can use the Web UI at http://localhost:54321
For more information visit http://docs.h2o.ai

----------------------------------------------------------------------


Attaching package: ‘h2o’

The following objects are masked from ‘package:stats’:

    cor, sd, var

The following objects are masked from ‘package:base’:

    &&, %*%, %in%, ||, apply, as.factor, as.numeric, colnames,
    colnames<-, ifelse, is.character, is.factor, is.numeric, log,
    log10, log1p, log2, round, signif, trunc

 Connection successful!

R is connected to the H2O cluster: 
    H2O cluster uptime:         1 hours 11 minutes 
    H2O cluster version:        3.10.2.2 
    H2O cluster version age:    1 month and 6 days  
    H2O cluster name:           H2O_started_from_R_micio1970_hro550 
    H2O cluster total nodes:    1 
    H2O cluster total memory:   1.55 GB 
    H2O cluster total cores:    4 
    H2O cluster allowed cores:  4 
    H2O cluster healthy:        TRUE 
    H2O Connection ip:          localhost 
    H2O Connection port:        54321 
    H2O Connection proxy:       NA 
    R Version:                  R version 3.3.2 (2016-10-31) 

  |======================================================================| 100%
  |======================================================================| 100%
  |======================================================================| 100%
   predict
1 1.549396
2 1.756449
3 2.538482
4 2.029516
5 2.582536
6 1.933579

[33 rows x 1 column] 

In [ ]: