running glm in r

10
4/23/ 13 Hack Airline Data With H 2 O in R Awesome hands on workshop for running big data analysis through R.

Upload: srisatish-ambati

Post on 26-Jan-2015

106 views

Category:

Technology


3 download

DESCRIPTION

Slides from Sept 26 hands on walk through: Running GLM on large data using H2O + R.

TRANSCRIPT

Page 1: Running GLM in R

4/23/13

Hack Airline DataWith H2O in RAwesome hands on workshop for running big data analysis through R.

Page 2: Running GLM in R
Page 3: Running GLM in R

Running H2O Through R

If you don’t already have h2o and R setup to talk:

1. Find an H2O flashdrive.

2. Download zip file and data. This has R package, jar and data!

Make sure you know the file path to where it downloaded or put it on your desktop.

Page 4: Running GLM in R

Start An Instance of H2O

We’re going to run H2O from your computer.

To do this open your command line terminal (or wherever you run java programming from)

CD to the directory with the h2o jar

</blah>/h2o-1.7.0.536

Page 5: Running GLM in R

Java Call for H2O Instance

Enter the java command:

java –Xmx<memory> -jar h2o.jar -name <your name or handle or whatev>

In the command above where you see memory specify the amount of memory you want to allocate to h2o. We found that we needed at least 4 gigs to run.

Page 6: Running GLM in R

H2O and R

Ok. You have an instance of h2o running? Good. Now go to R.

In the R console either change your working directory or be ready to give R an absolute path to the R package

>install.packages(install.packages("<unzipped h2o directory>/R/h2oWrapper_1.0.tar.gz", repos = NULL, type = "source")

Page 7: Running GLM in R

Get Up To Speed

> h2oWrapper.installDepPkgs()

> localH2O = h2oWrapper.init(ip = "localhost", port = 54321, startH2O = TRUE, silentUpgrade = FALSE, promptUpgrade = TRUE)

Page 8: Running GLM in R

Something Like This Should Happen

stuff

Stuff

Stuff

Successfully connected to http://localhost:54321

Page 9: Running GLM in R

Import the Airline Data to R

We’re using the full data set.

You’re using a data set that will fit on your laptop.

>h2o.importFile(localH2O, "~/Desktop/Airlines.csv", key="", parse = TRUE, sep = "")

Page 10: Running GLM in R

GLM on Airlines Data in R

Watch the screen – We’ll do it together.

We’re not producing anything different in h2o R than you would get with web GUI.

The primary difference is that you can now process data through the familiar R interface that R without H2O chokes on.