SlideShare a Scribd company logo
H2O.ai

Machine Intelligence
High Performance Machine
Learning in R with H2O
Erin LeDell Ph.D.
ISM HPC on R Workshop
Tokyo, Japan

October 2015
H2O.ai

Machine Intelligence
Introduction
• Statistician & Machine Learning Scientist at H2O.ai in
Mountain View, California, USA
• Ph.D. in Biostatistics with Designated Emphasis in
Computational Science and Engineering from 

UC Berkeley (focus on Machine Learning)
• Worked as a data scientist at several startups
• Written a handful of machine learning R packages
H2O.ai

Machine Intelligence
Agenda
• What/who is H2O.ai?
• H2O Machine Learning Software
• H2O Architecture
• H2O in R & Demo
• Sparking Water: H2O on Spark
• Ensembles in H2O & Demo
H2O.ai

Machine Intelligence
H2O.ai
H2O Company
H2O Software
• Team: 35. Founded in 2012, Mountain View, CA
• Stanford Math & Systems Engineers
• Open Source Software

• Ease of Use via Web Interface
• R, Python, Scala, Spark & Hadoop Interfaces
• Distributed Algorithms Scale to Big Data
H2O.ai

Machine Intelligence
H2O.ai Founders
SriSatish Ambati
• CEO and Co-founder at H2O.ai
• Past: Platfora, Cassandra, DataStax, Azul Systems,
UC Berkeley
• CTO and Co-founder at H2O.ai

• Past: Azul Systems, Sun Microsystems
• Developed the Java HotSpot Server Compiler at Sun
• PhD in CS from Rice University
Dr. Cliff Click
H2O.ai

Machine Intelligence
Scientific Advisory Council
Dr. Trevor Hastie
Dr. Rob Tibshirani
Dr. Stephen Boyd
• John A. Overdeck Professor of Mathematics, Stanford University
• PhD in Statistics, Stanford University
• Co-author, The Elements of Statistical Learning: Prediction, Inference and Data Mining
• Co-author with John Chambers, Statistical Models in S
• Co-author, Generalized Additive Models
• 108,404 citations (via Google Scholar)
• Professor of Statistics and Health Research and Policy, Stanford University
• PhD in Statistics, Stanford University
• COPPS Presidents’ Award recipient
• Co-author, The Elements of Statistical Learning: Prediction, Inference and Data Mining
• Author, Regression Shrinkage and Selection via the Lasso
• Co-author, An Introduction to the Bootstrap
• Professor of Electrical Engineering and Computer Science, Stanford University
• PhD in Electrical Engineering and Computer Science, UC Berkeley
• Co-author, Convex Optimization
• Co-author, Linear Matrix Inequalities in System and Control Theory
• Co-author, Distributed Optimization and Statistical Learning via the Alternating Direction
Method of Multipliers
H2O.ai

Machine Intelligence
H2O Platform
Part 1 of 7
High Performance ML in R with H2O
H2O.ai

Machine Intelligence
H2O Software
H2O is an open source, distributed, Java machine learning library.
APIs are available for:
R, Python, Scala & JSON
H2O.ai

Machine Intelligence
H2O Overview
Speed Matters!
No Sampling
Interactive UI
Cutting-Edge
Algorithms
• Time is valuable
• In-memory is faster
• Distributed is faster
• High speed AND accuracy
• Scale to big data
• Access data links
• Use all data without sampling
• Web-based modeling with H2O Flow
• Model comparison
• Suite of cutting-edge machine learning algorithms
• Deep Learning & Ensembles
• NanoFast Scoring Engine
H2O.ai

Machine Intelligence
Current Algorithm Overview
Statistical Analysis
• Linear Models (GLM)
• Cox Proportional Hazards
• Naïve Bayes
Ensembles
• Random Forest
• Distributed Trees
• Gradient Boosting Machine
• R Package - Super Learner
Ensembles
Deep Neural Networks
• Multi-layer Feed-Forward
Neural Network
• Auto-encoder
• Anomaly Detection
• Deep Features
Clustering
• K-Means
Dimension Reduction
• Principal Component Analysis
• Generalized Low Rank Models
Solvers & Optimization
• Generalized ADMM Solver
• L-BFGS (Quasi Newton
Method)
• Ordinary Least-Square Solver
• Stochastic Gradient Descent
Data Munging
• Integrated R-Environment
• Slice, Log Transform
H2O.ai

Machine Intelligence
H2O.ai

Machine Intelligence
H2O Flow Interface
H2O.ai

Machine Intelligence
http://h2o.ai/download
H2O.ai

Machine Intelligence
https://github.com/h2oai/h2o-3
H2O.ai

Machine Intelligence
H2O Architecture
Part 2 of 7
High Performance ML in R with H2O
H2O.ai

Machine Intelligence
Distributed Key
Value Store
H2O Frame
H2O Components
• Multi-node cluster with shared memory model.
• All computations in memory.
• Each node sees only some rows of the data.
• No limit on cluster size.
• Objects in the H2O cluster such as data frames,
models and results are all referenced by key.
• Any node in the cluster can access any object in
the cluster by key.
• Distributed data frames (collection of vectors).
• Columns are distributed (across nodes) arrays.
• Each node must be able to see the entire dataset
(achieved using HDFS, S3, or multiple copies of
the data if it is a CSV file).
H2O Cluster
H2O.ai

Machine Intelligence
Key’s Home Node
Distributed K/V Store
• The H2O K/V Store is a classic peer-to-peer
distributed hash table.
• There is no “name-node” nor central key
dictionary.
• Each key has a home-node, but the homes are
picked pseudo-randomly per-key.
• This allows us to force keys to “home” to different
nodes (usually for load-balance reasons).
• A key's “home” is solely responsible for breaking
ties in racing writes and is the “source of truth.”
• Keys can be cached anywhere, and both reads &
writes can be cached (although a write is not
complete until it reaches “home”.)
Peer-to-Peer
Pseudo-Random Hash
H2O.ai

Machine Intelligence
Data Shape
Data in H2O
• We read data fully parallelized from: HDFS, NFS,
Amazon S3, URLs, URIs, CSV, SVMLight.
• Data is highly compressed (about 2-4 times
smaller than gzip).
• Memory bound, not CPU bound.
• If data accessed linearly, as fast as C or Fortran.
• Speed = data volume / memory bandwidth
• ~50GB / sec (varies by hardware).
• Table width: <1k fast, <10k works, <100k slow
• Table length: Limited only by memory
• We have tested 10’s of billions of rows (TBs)
Highly Compressed
Speed
H2O.ai

Machine Intelligence
Distributed H2O Frame
Diagram of distributed arrays. An “H2O Frame” is a
collection of distributed arrays.
H2O.ai

Machine Intelligence
Optimizations
Communication in H2O
• H2O requires network communication to JVMs in
unrelated process or machine memory spaces.
• That network communication can be fast or slow,
or may drop packets & sockets (even TCP can
silently fail), and may need to be retried.
• H2O implements a reliable RPC which retries
failed communications at the RPC level.
• We can pull cables from a running cluster, and
plug them back in, and the cluster will recover.
• Message data is compressed in a variety of ways
(because CPU is cheaper than network).
• Short messages are sent via 1 or 2 UDP packets;
larger message use TCP for congestion control.
Network
Communication
Reliable RPC
H2O.ai

Machine Intelligence
Ease of Use
Data Processing in H2O
• Map/Reduce is a nice way to write blatantly
parallel code (although not the only way), and we
support a particularly fast and efficient flavor.
• Distributed fork/join and parallel map: within each
node, classic fork / join
• We have a GroupBy operator running at scale
(called ddply in the R community).
• GroupBy can handle millions of groups on billions
of rows, and runs Map/Reduce tasks on the
group members.
• H2O has overloaded all the basic data frame
manipulation functions in R and Python.
• Tasks such as imputation and one-hot encoding
of categoricals is performed inside the algorithms.
Map Reduce
Group By
H2O.ai

Machine Intelligence
H2O on Amazon
Part 3 of 7
High Performance ML in R with H2O
H2O.ai

Machine Intelligence
H2O on Amazon EC2
H2O can easily be deployed on an Amazon EC2 cluster.
The GitHub repository contains example scripts that 

help to automate the cluster deployment.
H2O.ai

Machine Intelligence
H2O.ai

Machine Intelligence
NERSC Supercomputers
Edison is ranked 34 and Hopper is 62 on TOP500.
We hope to be running H2O at NERSC soon… :-)
H2O.ai

Machine Intelligence
H2O in R
Part 4 of 7
High Performance ML in R with H2O
H2O.ai

Machine Intelligence
Design
“h2o” R package on CRAN
• The only requirement to run the “h2o” R package
is R >=3.1.0 and Java 7 or later.
• Tested on many versions of Linux, OS X and
Windows.
• The easiest way to install the “h2o” R package is
to install directly from CRAN.
• Latest version: http://h2o.ai/download
• No computation is ever performed in R.
• All computations are performed (in highly
optimized Java code) in the H2O cluster and
initiated by REST calls from R.
Requirements
Installation
H2O.ai

Machine Intelligence
Start H2O Cluster from R
H2O.ai

Machine Intelligence
H2O in R: Load Data
R code example: Load data
H2O.ai

Machine Intelligence
H2O in R: Train & Test
R code example: Train and Test a GBM
H2O.ai

Machine Intelligence
H2O in R: Plotting
plot(fit) plots scoring history over time.
H2O.ai

Machine Intelligence
H2O in R: Grid Search
R code example: Execute a DL Grid Search
H2O.ai

Machine Intelligence
Live H2O Demo!
https://gist.github.com/ledell
Install H2O (stable): install_h2o_slater.R
Demo: h2o_higgs_simple_demo.R
H2O.ai

Machine Intelligence
H2O Ensemble
Part 5 of 7
High Performance ML in R with H2O
H2O.ai

Machine Intelligence
What is Ensemble Learning?
What it is: ✤ “Ensemble methods use multiple learning algorithms
to obtain better predictive performance that could be
obtained from any of the constituent learning
algorithms.” (Wikipedia, 2015)
✤ Random Forests and Gradient Boosting Machines
(GBM) are both ensembles of decision trees.
✤ Stacking, or Super Learning, is technique for
combining various learners into a single, powerful
learner using a second-level metalearning algorithm.
Ensembles typically achieve superior model
performance over singular methods. However, this
comes at a price — computation time.
What it’s not:
H2O.ai

Machine Intelligence
Super Learner
Why ensembles?
H2O Ensemble Overview
• Regression
• Binary Classification / Ranking
• Coming soon: Support for multi-class
• H2O Ensemble implements the Super Learner
algorithm.
• The Super Learner algorithm finds the optimal
(based on defined loss) combination of a
collection of base learning algorithms.
• When a single algorithm does not approximate
the true prediction function well.
• When model performance is the most important
factor (over training speed and interpretability).
ML Tasks
H2O.ai

Machine Intelligence
Super Learner: The setup
H2O.ai

Machine Intelligence
Super Learner: The Algorithm
H2O.ai

Machine Intelligence
H2O Ensemble R Interface
R code example: Set up an H2O Ensemble
H2O.ai

Machine Intelligence
H2O Ensemble R Interface
R code example: Train and Test an Ensemble
H2O.ai

Machine Intelligence
Live H2O Demo!
https://gist.github.com/ledell
Install H2O Ensemble: install_h2oEnsemble.R
Demo: lending_club_bad_loans_ensemble.R
H2O.ai

Machine Intelligence
Sparkling Water
Part 6 of 7
High Performance ML in R with H2O
H2O.ai

Machine Intelligence
SparkR
Apache Spark and SparkR
• Apache Spark is an open source in-memory
processing engine built around speed.
• It was originally developed at UC Berkeley in
2009.
• Spark is commonly used on commodity clusters
(such as Amazon EC2).
• CRAY has been working with Spark community to
optimize Spark for CRAY supercomputers.
• Spark is written in Scala, but APIs exist for
Python and R.
• “SparkR” is the R API and has been part of Spark
since Spark 1.4 (June, 2015).
Apache Spark
Spark for HPC
H2O.ai

Machine Intelligence
Distributed Frames
H2O vs SparkR
• Major difference is that SparkR creates a
collection of slave R instances.
• H2O uses a single R session and communicates
to the H2O Java cluster via REST calls.
• In Spark 1.5 (latest release), only GLM is
accessible in R via SparkR.
• All H2O algorithms are available via R.
• Both H2O and Spark use distributed data frames.
• SparkR is most useful for data processing on
distributed data frames.
Architecture
Machine Learning
Algorithms
H2O.ai

Machine Intelligence
Sparkling Shell
H2O Sparkling Water
• Sparkling Water is transparent integration of H2O
into the Spark ecosystem.
• H2O runs inside the Spark Executor JVM.
• Provides advanced machine learning algorithms
to Spark workflows.
• Sophisticated alternative to the default MLlib
library in Spark.
• Sparkling Shell is just a standard Spark shell with
additional Sparkling Water classes
• export MASTER=“local-cluster[3,2,1024]”
• spark-shell —jars sparkling-water.jar
Spark Integration
Benefits
H2O.ai

Machine Intelligence
H2O in Action
Part 7 of 7
High Performance ML in R with H2O
H2O.ai

Machine Intelligence
Actual Customer Use Cases
Ad optimization (200% CPA lift with H2O)
Fraud detection — 11% higher accuracy
with H2O Deep Learning (saves millions
of dollars)
Propensity to Buy model factory (60,000
models, 15x faster with H2O)
H2O.ai

Machine Intelligence
H2O on
https://www.kaggle.com/mlandry
• H2O starter scripts available on Kaggle
• H2O is used in many competitions on Kaggle
• Mark Landry, H2O Data Scientist and Competitive Kaggler
H2O.ai

Machine Intelligence
Where to learn more?
• H2O Online Training (free): http://learn.h2o.ai
• H2O Slidedecks: http://www.slideshare.net/0xdata
• H2O Video Presentations: https://www.youtube.com/user/0xdata
• H2O Community Events & Meetups: http://h2o.ai/events
• Machine Learning & Data Science courses: http://coursebuffet.com
H2O.ai

Machine Intelligence
H2O Booklets
https://github.com/h2oai/h2o-3/tree/master/h2o-docs/src/
booklets/v2_2015/PDFs/online
H2O.ai

Machine IntelligenceCustomers • Community • Evangelists
35 Speakers
Training
2-Full Days
Nov. 9 - 11
http://world.h2o.ai
20% Discount code:
h2ocommunity
H2O.ai

Machine Intelligence
ありがとう
@ledell on Twitter, GitHub
erin@h2o.ai
http://www.stat.berkeley.edu/~ledell

More Related Content

PDF
Sparkling Water 5 28-14
PDF
data.table and H2O at LondonR with Matt Dowle
PPTX
Big Data Science with H2O in R
PDF
H2O with Erin LeDell at Portland R User Group
PDF
H2O World - Sparkling Water - Michal Malohlava
PDF
Webinar: Deep Learning with H2O
PDF
Deep Learning with MXNet - Dmitry Larko
PDF
Introduction to Apache Flink - Fast and reliable big data processing
Sparkling Water 5 28-14
data.table and H2O at LondonR with Matt Dowle
Big Data Science with H2O in R
H2O with Erin LeDell at Portland R User Group
H2O World - Sparkling Water - Michal Malohlava
Webinar: Deep Learning with H2O
Deep Learning with MXNet - Dmitry Larko
Introduction to Apache Flink - Fast and reliable big data processing

What's hot (20)

PPTX
AI Development with H2O.ai
PDF
Scalable Data Science and Deep Learning with H2O
PPTX
Suneel Marthi - Deep Learning with Apache Flink and DL4J
PDF
Albert Bifet – Apache Samoa: Mining Big Data Streams with Apache Flink
PDF
Fast and Scalable Python
PPT
GPU Accelerated Machine Learning
PDF
Spark Meetup @ Netflix, 05/19/2015
PDF
H2O Deep Water - Making Deep Learning Accessible to Everyone
PPTX
Applying Machine Learning using H2O
PDF
Extending Spark's Ingestion: Build Your Own Java Data Source with Jean George...
PDF
Machine Learning as a Service: Apache Spark MLlib Enrichment and Web-Based Co...
PDF
Latest Developments in H2O
PPTX
A Scaleable Implementation of Deep Learning on Spark -Alexander Ulanov
PDF
Apache con big data 2015 - Data Science from the trenches
PPTX
Deep-Dive into Deep Learning Pipelines with Sue Ann Hong and Tim Hunter
PDF
Snorkel: Dark Data and Machine Learning with Christopher Ré
PDF
Flare: Scale Up Spark SQL with Native Compilation and Set Your Data on Fire! ...
PDF
Sparkling Water 2.0 - Michal Malohlava
PPTX
Data Stream Algorithms in Storm and R
PDF
Matrix Factorizations at Scale: a Comparison of Scientific Data Analytics on ...
AI Development with H2O.ai
Scalable Data Science and Deep Learning with H2O
Suneel Marthi - Deep Learning with Apache Flink and DL4J
Albert Bifet – Apache Samoa: Mining Big Data Streams with Apache Flink
Fast and Scalable Python
GPU Accelerated Machine Learning
Spark Meetup @ Netflix, 05/19/2015
H2O Deep Water - Making Deep Learning Accessible to Everyone
Applying Machine Learning using H2O
Extending Spark's Ingestion: Build Your Own Java Data Source with Jean George...
Machine Learning as a Service: Apache Spark MLlib Enrichment and Web-Based Co...
Latest Developments in H2O
A Scaleable Implementation of Deep Learning on Spark -Alexander Ulanov
Apache con big data 2015 - Data Science from the trenches
Deep-Dive into Deep Learning Pipelines with Sue Ann Hong and Tim Hunter
Snorkel: Dark Data and Machine Learning with Christopher Ré
Flare: Scale Up Spark SQL with Native Compilation and Set Your Data on Fire! ...
Sparkling Water 2.0 - Michal Malohlava
Data Stream Algorithms in Storm and R
Matrix Factorizations at Scale: a Comparison of Scientific Data Analytics on ...
Ad

Viewers also liked (20)

PDF
Intro to Machine Learning with H2O and AWS
PPTX
Applying Machine Learning using H2O
PDF
Applied Machine learning using H2O, python and R Workshop
PPTX
Tom Kraljevic presents H2O on Hadoop- how it works and what we've learned
PDF
Deep Learning through Examples
PPTX
H2O World - Clustering & Feature Extraction on Text - Seth Redmore
PPTX
Data Science, Machine Learning, and H2O
PDF
H2O Big Data Environments
PDF
Intro to Machine Learning with H2O and Python - Denver
PDF
H2O World - Benchmarking Open Source ML Platforms - Szilard Pafka
PDF
Intro to H2O Machine Learning in R at Santa Clara University
PDF
MLconf - Distributed Deep Learning for Classification and Regression Problems...
PDF
GBM in H2O with Cliff Click: H2O API
PDF
Machine Learning with H2O, Spark, and Python at Strata 2015
PDF
Apache Spark 2.0: Faster, Easier, and Smarter
PDF
PayPal's Fraud Detection with Deep Learning in H2O World 2014
PDF
Transform your Business with AI, Deep Learning and Machine Learning
PDF
Data 360 Conference: Introduction to Big Data, Hadoop and Big Data Analytics
PDF
ETL in R
PDF
Taking R Mainstream in Production Systems
Intro to Machine Learning with H2O and AWS
Applying Machine Learning using H2O
Applied Machine learning using H2O, python and R Workshop
Tom Kraljevic presents H2O on Hadoop- how it works and what we've learned
Deep Learning through Examples
H2O World - Clustering & Feature Extraction on Text - Seth Redmore
Data Science, Machine Learning, and H2O
H2O Big Data Environments
Intro to Machine Learning with H2O and Python - Denver
H2O World - Benchmarking Open Source ML Platforms - Szilard Pafka
Intro to H2O Machine Learning in R at Santa Clara University
MLconf - Distributed Deep Learning for Classification and Regression Problems...
GBM in H2O with Cliff Click: H2O API
Machine Learning with H2O, Spark, and Python at Strata 2015
Apache Spark 2.0: Faster, Easier, and Smarter
PayPal's Fraud Detection with Deep Learning in H2O World 2014
Transform your Business with AI, Deep Learning and Machine Learning
Data 360 Conference: Introduction to Big Data, Hadoop and Big Data Analytics
ETL in R
Taking R Mainstream in Production Systems
Ad

Similar to High Performance Machine Learning in R with H2O (20)

PPTX
Intro to R and H2O with Spencer Aiello
PDF
New Developments in H2O: April 2017 Edition
PDF
Scalable Machine Learning in R and Python with H2O
PDF
Intro to H2O Machine Learning in Python - Galvanize Seattle
PDF
H2O at Berlin R Meetup
PDF
Berlin R Meetup
PDF
H2O at Poznan R Meetup
PDF
Intro to H2O in Python - Data Science LA
PDF
Introduction to H2O and Model Stacking Use Cases
PDF
Introduction to Machine Learning with H2O and Python
PDF
Introduction to data science with H2O-Chicago
PDF
Introduction to Data Science with H2O- Mountain View
PDF
H2O Overview with Amy Wang at useR! Aalborg
PDF
Belgrade R - Intro to H2O and Deep Water
PDF
H2O at BelgradeR Meetup
PDF
Scalable Automatic Machine Learning in H2O
PDF
Introducción al Aprendizaje Automatico con H2O-3 (1)
PDF
ArnoCandelScalabledatascienceanddeeplearningwithh2o_gotochg
PDF
Start Getting Your Feet Wet in Open Source Machine and Deep Learning
PPTX
Machine Learning for Smarter Apps - Jacksonville Meetup
Intro to R and H2O with Spencer Aiello
New Developments in H2O: April 2017 Edition
Scalable Machine Learning in R and Python with H2O
Intro to H2O Machine Learning in Python - Galvanize Seattle
H2O at Berlin R Meetup
Berlin R Meetup
H2O at Poznan R Meetup
Intro to H2O in Python - Data Science LA
Introduction to H2O and Model Stacking Use Cases
Introduction to Machine Learning with H2O and Python
Introduction to data science with H2O-Chicago
Introduction to Data Science with H2O- Mountain View
H2O Overview with Amy Wang at useR! Aalborg
Belgrade R - Intro to H2O and Deep Water
H2O at BelgradeR Meetup
Scalable Automatic Machine Learning in H2O
Introducción al Aprendizaje Automatico con H2O-3 (1)
ArnoCandelScalabledatascienceanddeeplearningwithh2o_gotochg
Start Getting Your Feet Wet in Open Source Machine and Deep Learning
Machine Learning for Smarter Apps - Jacksonville Meetup

More from Sri Ambati (20)

PDF
H2O Label Genie Starter Track - Support Presentation
PDF
H2O.ai Agents : From Theory to Practice - Support Presentation
PDF
H2O Generative AI Starter Track - Support Presentation Slides.pdf
PDF
H2O Gen AI Ecosystem Overview - Level 1 - Slide Deck
PDF
An In-depth Exploration of Enterprise h2oGPTe Slide Deck
PDF
Intro to Enterprise h2oGPTe Presentation Slides
PDF
Enterprise h2o GPTe Learning Path Slide Deck
PDF
H2O Wave Course Starter - Presentation Slides
PDF
Large Language Models (LLMs) - Level 3 Slides
PDF
Data Science and Machine Learning Platforms (2024) Slides
PDF
Data Prep for H2O Driverless AI - Slides
PDF
H2O Cloud AI Developer Services - Slides (2024)
PDF
LLM Learning Path Level 2 - Presentation Slides
PDF
LLM Learning Path Level 1 - Presentation Slides
PDF
Hydrogen Torch - Starter Course - Presentation Slides
PDF
Presentation Resources - H2O Gen AI Ecosystem Overview - Level 2
PDF
H2O Driverless AI Starter Course - Slides and Assignments
PPTX
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
PDF
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
PPTX
Generative AI Masterclass - Model Risk Management.pptx
H2O Label Genie Starter Track - Support Presentation
H2O.ai Agents : From Theory to Practice - Support Presentation
H2O Generative AI Starter Track - Support Presentation Slides.pdf
H2O Gen AI Ecosystem Overview - Level 1 - Slide Deck
An In-depth Exploration of Enterprise h2oGPTe Slide Deck
Intro to Enterprise h2oGPTe Presentation Slides
Enterprise h2o GPTe Learning Path Slide Deck
H2O Wave Course Starter - Presentation Slides
Large Language Models (LLMs) - Level 3 Slides
Data Science and Machine Learning Platforms (2024) Slides
Data Prep for H2O Driverless AI - Slides
H2O Cloud AI Developer Services - Slides (2024)
LLM Learning Path Level 2 - Presentation Slides
LLM Learning Path Level 1 - Presentation Slides
Hydrogen Torch - Starter Course - Presentation Slides
Presentation Resources - H2O Gen AI Ecosystem Overview - Level 2
H2O Driverless AI Starter Course - Slides and Assignments
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
Generative AI Masterclass - Model Risk Management.pptx

Recently uploaded (20)

PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Complete React Javascript Course Syllabus.pdf
PDF
AI in Product Development-omnex systems
PDF
System and Network Administraation Chapter 3
PDF
Digital Strategies for Manufacturing Companies
PPTX
ISO 45001 Occupational Health and Safety Management System
PPTX
ai tools demonstartion for schools and inter college
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPT
Introduction Database Management System for Course Database
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Transform Your Business with a Software ERP System
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Complete React Javascript Course Syllabus.pdf
AI in Product Development-omnex systems
System and Network Administraation Chapter 3
Digital Strategies for Manufacturing Companies
ISO 45001 Occupational Health and Safety Management System
ai tools demonstartion for schools and inter college
Design an Analysis of Algorithms I-SECS-1021-03
Introduction Database Management System for Course Database
How to Choose the Right IT Partner for Your Business in Malaysia
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Transform Your Business with a Software ERP System
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
ManageIQ - Sprint 268 Review - Slide Deck
Understanding Forklifts - TECH EHS Solution
Adobe Illustrator 28.6 Crack My Vision of Vector Design

High Performance Machine Learning in R with H2O

  • 1. H2O.ai
 Machine Intelligence High Performance Machine Learning in R with H2O Erin LeDell Ph.D. ISM HPC on R Workshop Tokyo, Japan
 October 2015
  • 2. H2O.ai
 Machine Intelligence Introduction • Statistician & Machine Learning Scientist at H2O.ai in Mountain View, California, USA • Ph.D. in Biostatistics with Designated Emphasis in Computational Science and Engineering from 
 UC Berkeley (focus on Machine Learning) • Worked as a data scientist at several startups • Written a handful of machine learning R packages
  • 3. H2O.ai
 Machine Intelligence Agenda • What/who is H2O.ai? • H2O Machine Learning Software • H2O Architecture • H2O in R & Demo • Sparking Water: H2O on Spark • Ensembles in H2O & Demo
  • 4. H2O.ai
 Machine Intelligence H2O.ai H2O Company H2O Software • Team: 35. Founded in 2012, Mountain View, CA • Stanford Math & Systems Engineers • Open Source Software
 • Ease of Use via Web Interface • R, Python, Scala, Spark & Hadoop Interfaces • Distributed Algorithms Scale to Big Data
  • 5. H2O.ai
 Machine Intelligence H2O.ai Founders SriSatish Ambati • CEO and Co-founder at H2O.ai • Past: Platfora, Cassandra, DataStax, Azul Systems, UC Berkeley • CTO and Co-founder at H2O.ai
 • Past: Azul Systems, Sun Microsystems • Developed the Java HotSpot Server Compiler at Sun • PhD in CS from Rice University Dr. Cliff Click
  • 6. H2O.ai
 Machine Intelligence Scientific Advisory Council Dr. Trevor Hastie Dr. Rob Tibshirani Dr. Stephen Boyd • John A. Overdeck Professor of Mathematics, Stanford University • PhD in Statistics, Stanford University • Co-author, The Elements of Statistical Learning: Prediction, Inference and Data Mining • Co-author with John Chambers, Statistical Models in S • Co-author, Generalized Additive Models • 108,404 citations (via Google Scholar) • Professor of Statistics and Health Research and Policy, Stanford University • PhD in Statistics, Stanford University • COPPS Presidents’ Award recipient • Co-author, The Elements of Statistical Learning: Prediction, Inference and Data Mining • Author, Regression Shrinkage and Selection via the Lasso • Co-author, An Introduction to the Bootstrap • Professor of Electrical Engineering and Computer Science, Stanford University • PhD in Electrical Engineering and Computer Science, UC Berkeley • Co-author, Convex Optimization • Co-author, Linear Matrix Inequalities in System and Control Theory • Co-author, Distributed Optimization and Statistical Learning via the Alternating Direction Method of Multipliers
  • 7. H2O.ai
 Machine Intelligence H2O Platform Part 1 of 7 High Performance ML in R with H2O
  • 8. H2O.ai
 Machine Intelligence H2O Software H2O is an open source, distributed, Java machine learning library. APIs are available for: R, Python, Scala & JSON
  • 9. H2O.ai
 Machine Intelligence H2O Overview Speed Matters! No Sampling Interactive UI Cutting-Edge Algorithms • Time is valuable • In-memory is faster • Distributed is faster • High speed AND accuracy • Scale to big data • Access data links • Use all data without sampling • Web-based modeling with H2O Flow • Model comparison • Suite of cutting-edge machine learning algorithms • Deep Learning & Ensembles • NanoFast Scoring Engine
  • 10. H2O.ai
 Machine Intelligence Current Algorithm Overview Statistical Analysis • Linear Models (GLM) • Cox Proportional Hazards • Naïve Bayes Ensembles • Random Forest • Distributed Trees • Gradient Boosting Machine • R Package - Super Learner Ensembles Deep Neural Networks • Multi-layer Feed-Forward Neural Network • Auto-encoder • Anomaly Detection • Deep Features Clustering • K-Means Dimension Reduction • Principal Component Analysis • Generalized Low Rank Models Solvers & Optimization • Generalized ADMM Solver • L-BFGS (Quasi Newton Method) • Ordinary Least-Square Solver • Stochastic Gradient Descent Data Munging • Integrated R-Environment • Slice, Log Transform
  • 15. H2O.ai
 Machine Intelligence H2O Architecture Part 2 of 7 High Performance ML in R with H2O
  • 16. H2O.ai
 Machine Intelligence Distributed Key Value Store H2O Frame H2O Components • Multi-node cluster with shared memory model. • All computations in memory. • Each node sees only some rows of the data. • No limit on cluster size. • Objects in the H2O cluster such as data frames, models and results are all referenced by key. • Any node in the cluster can access any object in the cluster by key. • Distributed data frames (collection of vectors). • Columns are distributed (across nodes) arrays. • Each node must be able to see the entire dataset (achieved using HDFS, S3, or multiple copies of the data if it is a CSV file). H2O Cluster
  • 17. H2O.ai
 Machine Intelligence Key’s Home Node Distributed K/V Store • The H2O K/V Store is a classic peer-to-peer distributed hash table. • There is no “name-node” nor central key dictionary. • Each key has a home-node, but the homes are picked pseudo-randomly per-key. • This allows us to force keys to “home” to different nodes (usually for load-balance reasons). • A key's “home” is solely responsible for breaking ties in racing writes and is the “source of truth.” • Keys can be cached anywhere, and both reads & writes can be cached (although a write is not complete until it reaches “home”.) Peer-to-Peer Pseudo-Random Hash
  • 18. H2O.ai
 Machine Intelligence Data Shape Data in H2O • We read data fully parallelized from: HDFS, NFS, Amazon S3, URLs, URIs, CSV, SVMLight. • Data is highly compressed (about 2-4 times smaller than gzip). • Memory bound, not CPU bound. • If data accessed linearly, as fast as C or Fortran. • Speed = data volume / memory bandwidth • ~50GB / sec (varies by hardware). • Table width: <1k fast, <10k works, <100k slow • Table length: Limited only by memory • We have tested 10’s of billions of rows (TBs) Highly Compressed Speed
  • 19. H2O.ai
 Machine Intelligence Distributed H2O Frame Diagram of distributed arrays. An “H2O Frame” is a collection of distributed arrays.
  • 20. H2O.ai
 Machine Intelligence Optimizations Communication in H2O • H2O requires network communication to JVMs in unrelated process or machine memory spaces. • That network communication can be fast or slow, or may drop packets & sockets (even TCP can silently fail), and may need to be retried. • H2O implements a reliable RPC which retries failed communications at the RPC level. • We can pull cables from a running cluster, and plug them back in, and the cluster will recover. • Message data is compressed in a variety of ways (because CPU is cheaper than network). • Short messages are sent via 1 or 2 UDP packets; larger message use TCP for congestion control. Network Communication Reliable RPC
  • 21. H2O.ai
 Machine Intelligence Ease of Use Data Processing in H2O • Map/Reduce is a nice way to write blatantly parallel code (although not the only way), and we support a particularly fast and efficient flavor. • Distributed fork/join and parallel map: within each node, classic fork / join • We have a GroupBy operator running at scale (called ddply in the R community). • GroupBy can handle millions of groups on billions of rows, and runs Map/Reduce tasks on the group members. • H2O has overloaded all the basic data frame manipulation functions in R and Python. • Tasks such as imputation and one-hot encoding of categoricals is performed inside the algorithms. Map Reduce Group By
  • 22. H2O.ai
 Machine Intelligence H2O on Amazon Part 3 of 7 High Performance ML in R with H2O
  • 23. H2O.ai
 Machine Intelligence H2O on Amazon EC2 H2O can easily be deployed on an Amazon EC2 cluster. The GitHub repository contains example scripts that 
 help to automate the cluster deployment.
  • 25. H2O.ai
 Machine Intelligence NERSC Supercomputers Edison is ranked 34 and Hopper is 62 on TOP500. We hope to be running H2O at NERSC soon… :-)
  • 26. H2O.ai
 Machine Intelligence H2O in R Part 4 of 7 High Performance ML in R with H2O
  • 27. H2O.ai
 Machine Intelligence Design “h2o” R package on CRAN • The only requirement to run the “h2o” R package is R >=3.1.0 and Java 7 or later. • Tested on many versions of Linux, OS X and Windows. • The easiest way to install the “h2o” R package is to install directly from CRAN. • Latest version: http://h2o.ai/download • No computation is ever performed in R. • All computations are performed (in highly optimized Java code) in the H2O cluster and initiated by REST calls from R. Requirements Installation
  • 29. H2O.ai
 Machine Intelligence H2O in R: Load Data R code example: Load data
  • 30. H2O.ai
 Machine Intelligence H2O in R: Train & Test R code example: Train and Test a GBM
  • 31. H2O.ai
 Machine Intelligence H2O in R: Plotting plot(fit) plots scoring history over time.
  • 32. H2O.ai
 Machine Intelligence H2O in R: Grid Search R code example: Execute a DL Grid Search
  • 33. H2O.ai
 Machine Intelligence Live H2O Demo! https://gist.github.com/ledell Install H2O (stable): install_h2o_slater.R Demo: h2o_higgs_simple_demo.R
  • 34. H2O.ai
 Machine Intelligence H2O Ensemble Part 5 of 7 High Performance ML in R with H2O
  • 35. H2O.ai
 Machine Intelligence What is Ensemble Learning? What it is: ✤ “Ensemble methods use multiple learning algorithms to obtain better predictive performance that could be obtained from any of the constituent learning algorithms.” (Wikipedia, 2015) ✤ Random Forests and Gradient Boosting Machines (GBM) are both ensembles of decision trees. ✤ Stacking, or Super Learning, is technique for combining various learners into a single, powerful learner using a second-level metalearning algorithm. Ensembles typically achieve superior model performance over singular methods. However, this comes at a price — computation time. What it’s not:
  • 36. H2O.ai
 Machine Intelligence Super Learner Why ensembles? H2O Ensemble Overview • Regression • Binary Classification / Ranking • Coming soon: Support for multi-class • H2O Ensemble implements the Super Learner algorithm. • The Super Learner algorithm finds the optimal (based on defined loss) combination of a collection of base learning algorithms. • When a single algorithm does not approximate the true prediction function well. • When model performance is the most important factor (over training speed and interpretability). ML Tasks
  • 39. H2O.ai
 Machine Intelligence H2O Ensemble R Interface R code example: Set up an H2O Ensemble
  • 40. H2O.ai
 Machine Intelligence H2O Ensemble R Interface R code example: Train and Test an Ensemble
  • 41. H2O.ai
 Machine Intelligence Live H2O Demo! https://gist.github.com/ledell Install H2O Ensemble: install_h2oEnsemble.R Demo: lending_club_bad_loans_ensemble.R
  • 42. H2O.ai
 Machine Intelligence Sparkling Water Part 6 of 7 High Performance ML in R with H2O
  • 43. H2O.ai
 Machine Intelligence SparkR Apache Spark and SparkR • Apache Spark is an open source in-memory processing engine built around speed. • It was originally developed at UC Berkeley in 2009. • Spark is commonly used on commodity clusters (such as Amazon EC2). • CRAY has been working with Spark community to optimize Spark for CRAY supercomputers. • Spark is written in Scala, but APIs exist for Python and R. • “SparkR” is the R API and has been part of Spark since Spark 1.4 (June, 2015). Apache Spark Spark for HPC
  • 44. H2O.ai
 Machine Intelligence Distributed Frames H2O vs SparkR • Major difference is that SparkR creates a collection of slave R instances. • H2O uses a single R session and communicates to the H2O Java cluster via REST calls. • In Spark 1.5 (latest release), only GLM is accessible in R via SparkR. • All H2O algorithms are available via R. • Both H2O and Spark use distributed data frames. • SparkR is most useful for data processing on distributed data frames. Architecture Machine Learning Algorithms
  • 45. H2O.ai
 Machine Intelligence Sparkling Shell H2O Sparkling Water • Sparkling Water is transparent integration of H2O into the Spark ecosystem. • H2O runs inside the Spark Executor JVM. • Provides advanced machine learning algorithms to Spark workflows. • Sophisticated alternative to the default MLlib library in Spark. • Sparkling Shell is just a standard Spark shell with additional Sparkling Water classes • export MASTER=“local-cluster[3,2,1024]” • spark-shell —jars sparkling-water.jar Spark Integration Benefits
  • 46. H2O.ai
 Machine Intelligence H2O in Action Part 7 of 7 High Performance ML in R with H2O
  • 47. H2O.ai
 Machine Intelligence Actual Customer Use Cases Ad optimization (200% CPA lift with H2O) Fraud detection — 11% higher accuracy with H2O Deep Learning (saves millions of dollars) Propensity to Buy model factory (60,000 models, 15x faster with H2O)
  • 48. H2O.ai
 Machine Intelligence H2O on https://www.kaggle.com/mlandry • H2O starter scripts available on Kaggle • H2O is used in many competitions on Kaggle • Mark Landry, H2O Data Scientist and Competitive Kaggler
  • 49. H2O.ai
 Machine Intelligence Where to learn more? • H2O Online Training (free): http://learn.h2o.ai • H2O Slidedecks: http://www.slideshare.net/0xdata • H2O Video Presentations: https://www.youtube.com/user/0xdata • H2O Community Events & Meetups: http://h2o.ai/events • Machine Learning & Data Science courses: http://coursebuffet.com
  • 51. H2O.ai
 Machine IntelligenceCustomers • Community • Evangelists 35 Speakers Training 2-Full Days Nov. 9 - 11 http://world.h2o.ai 20% Discount code: h2ocommunity
  • 52. H2O.ai
 Machine Intelligence ありがとう @ledell on Twitter, GitHub erin@h2o.ai http://www.stat.berkeley.edu/~ledell