Introduction to AutoML: Using H2O Flow
By: Shashvat G
Tags: H2o, Automl, Data Science, Tech, Machine Learning

It is widely known that the field of Data Science is highly dynamic and there is something new in DS stack every day. The advent of AutoML is certainly a commendable push to this stack. Not only it enables people with zero programming background to create and build an ML model but also it makes the life of Data scientists much easier.

So, What is AutoML?

Well, AutoML is here to stay, an abbreviation for Automated Machine learning that aims to automate training and building of machine learning models. AutoML ensures machine learning is available even to people with no particular background in programming.

Gone are the days when Data scientists needed to build a baseline model from scratch(depending upon the use case, Of course!). Enter AutoML, just a few clicks, and your baseline is ready.

H2O is licensed under the Apache License, Version 2.0 and has a Web User interface called H2o Flow.

Basically, H2o Flow is a web-based interactive tool that allows data selection from various sources, visualization, a seamless environment for model building, prediction, evaluating, and exporting your model. In my opinion, H2o’s core strength is it’s distributed in-memory processing.

H2O is written in Java and it supports algorithms used frequently in Data science, For instance, GBM, Random Forest, and Stacked Ensembles. H2O works with R, Python, Scala on Hadoop/Yarn, Spark, or your laptop.

Installation

You can get H2o here. You would probably need Java installed in your system for H2o Flow to work. Also, if you have python installed on your system, you can simply install this package with a conda install. see below :

conda install -c h2oai h2o

You can safely ignore the above step if you gonna use H2o Flow. Notably, H2o is also available for R, and Hadoop. Downloading H2o will replicate a zip file on your system and that contains everything you need to get started.

Head to your terminal, unzip, and start H2o. Here are the commands that might be helpful:

cd ~/Downloads unzip h2o-3.30.0.6.zip cd h2o-3.30.0.6 java -jar h2o.jar

Go to your browser and open H2o.

H2O Flow Home Page

In this post, we’ll not discuss the menu icons and bar at the top as these are fairly self-explanatory. You can always check the help section available on the right.

We will use USA housing Dataset which is available here to build a simple regression model that can predict house prices based on given features such as Area Population, Average Area Income. We will follow these steps in order to build a model:

Import Files

Split Frame

Build Model

Prediction

Please note that there are other steps in Machine learning Pipeline like EDA(Exploratory Data Analysis), Pre-processing, etc. which are not covered in this tutorial.

Let’s get right to the routines that will help you build a simple regression model.

1. Import Files

This is where you can define your data source, parse your input file, and define parser as CSV, AUTO, XLSX, or even parquet files(source file format for Hadoop which is efficient in terms of storage and performance).

Import files into H2o

Set up your parser as required, see below for reference.

Parser set up

Once it is loaded into H2o, you should be able to view a nice summary of columns in your dataset, the number of columns, rows, and even missing values.

Loaded Data

H2o also allows you to impute values for missing fields for example with the mean value. Simply, Click on the column labels, this will take you to that particular column details where you can perform actions such as Impute and Inspect. Inspect the values for generating plots such as distribution plots and line charts.