Slide 1

Slide 1 text

H 2 O.ai
 Machine Intelligence Intro to H2O Machine Learning in Python Erin LeDell Ph.D. DataScience.LA January 2016

Slide 2

Slide 2 text

H 2 O.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 several machine learning software packages

Slide 3

Slide 3 text

H 2 O.ai
 Machine Intelligence H2O.ai H2O Company H2O Software • Team: 50. 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

Slide 4

Slide 4 text

H 2 O.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

Slide 5

Slide 5 text

H 2 O.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

Slide 6

Slide 6 text

H 2 O.ai
 Machine Intelligence Agenda • H2O Platform • H2O Python module • EEG Python Notebook Demo

Slide 7

Slide 7 text

H 2 O.ai
 Machine Intelligence H2O Platform Part 1 of 3 Intro to H2O in Python

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

H 2 O.ai
 Machine Intelligence H2O Software 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

Slide 10

Slide 10 text

H 2 O.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

Slide 11

Slide 11 text

H 2 O.ai
 Machine Intelligence Distributed Key Value Store H2O Frame H2O Distributed Computing • 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

Slide 12

Slide 12 text

H 2 O.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.

Slide 13

Slide 13 text

H 2 O.ai
 Machine Intelligence http://h2o.ai/download/h2o/python

Slide 14

Slide 14 text

H 2 O.ai
 Machine Intelligence https://github.com/h2oai/h2o-3

Slide 15

Slide 15 text

H 2 O.ai
 Machine Intelligence H2O for Python Part 2 of 3 Intro to H2O in Python

Slide 16

Slide 16 text

H 2 O.ai
 Machine Intelligence Design h2o Python module • Java 7 or later. • Python 2 or 3. • A few Python module dependencies. • Linux, OS X or Windows. • The easiest way to install the “h2o” Python module is pip. • Latest version: http://h2o.ai/download • No computation is ever performed in Python. • All computations are performed in highly optimized Java code in the H2O cluster and initiated by REST calls from Python. Requirements Installation

Slide 17

Slide 17 text

H 2 O.ai
 Machine Intelligence Start H2O Cluster from Python

Slide 18

Slide 18 text

H 2 O.ai
 Machine Intelligence Start H2O Cluster from Python

Slide 19

Slide 19 text

H 2 O.ai
 Machine Intelligence Train a model (e.g. GBM)

Slide 20

Slide 20 text

H 2 O.ai
 Machine Intelligence Inspect Model Performance

Slide 21

Slide 21 text

H 2 O.ai
 Machine Intelligence EEG Demo Part 3 of 3 Intro to H2O in Python

Slide 22

Slide 22 text

H 2 O.ai
 Machine Intelligence EEG for Eye Detection Problem Data • Goal is to accurately predict the eye state using minimal, surface level EEG data. • Binary outcome: Open vs Closed • Data from Emotiv Neuralheadset. • Predictor variables describe signals from 14 EEG channels placed on the surface of the head. Source: http://archive.ics.uci.edu/ml/datasets/EEG+Eye+State

Slide 23

Slide 23 text

H 2 O.ai
 Machine Intelligence EEG Data in H2O Flow

Slide 24

Slide 24 text

H 2 O.ai
 Machine Intelligence EEG Data in H2O Python

Slide 25

Slide 25 text

H 2 O.ai
 Machine Intelligence H2O Python Demo https://github.com/h2oai/h2o-3/blob/master/ h2o-py/demos/H2O_tutorial_eeg_eyestate.ipynb For comparison, there is scikit-learn version: https://github.com/h2oai/h2o-3/blob/master/h2o-py/demos/ EEG_eyestate_sklearn_NOPASS.ipynb

Slide 26

Slide 26 text

H 2 O.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

Slide 27

Slide 27 text

H 2 O.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

Slide 28

Slide 28 text

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

Slide 29

Slide 29 text

H 2 O.ai
 Machine Intelligence Thank you! @ledell on Twitter, GitHub [email protected] http://www.stat.berkeley.edu/~ledell