Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Practical Automated Machine Learning Using H2O.ai

You're reading from   Practical Automated Machine Learning Using H2O.ai Discover the power of automated machine learning, from experimentation through to deployment to production

Arrow left icon
Product type Paperback
Published in Sep 2022
Publisher Packt
ISBN-13 9781801074520
Length 396 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Salil Ajgaonkar Salil Ajgaonkar
Author Profile Icon Salil Ajgaonkar
Salil Ajgaonkar
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Preface 1. Part 1 H2O AutoML Basics
2. Chapter 1: Understanding H2O AutoML Basics FREE CHAPTER 3. Chapter 2: Working with H2O Flow (H2O’s Web UI) 4. Part 2 H2O AutoML Deep Dive
5. Chapter 3: Understanding Data Processing 6. Chapter 4: Understanding H2O AutoML Architecture and Training 7. Chapter 5: Understanding AutoML Algorithms 8. Chapter 6: Understanding H2O AutoML Leaderboard and Other Performance Metrics 9. Chapter 7: Working with Model Explainability 10. Part 3 H2O AutoML Advanced Implementation and Productization
11. Chapter 8: Exploring Optional Parameters for H2O AutoML 12. Chapter 9: Exploring Miscellaneous Features in H2O AutoML 13. Chapter 10: Working with Plain Old Java Objects (POJOs) 14. Chapter 11: Working with Model Object, Optimized (MOJO) 15. Chapter 12: Working with H2O AutoML and Apache Spark 16. Chapter 13: Using H2O AutoML with Other Technologies 17. Index 18. Other Books You May Enjoy

Using a H2O model as a POJO

As mentioned in the previous section, a model POJO can be used on any platform that has a JVM installed. The only dependency is the h2o-genmodel.jar file, a JAR file that’s needed to compile and run the model POJO to make predictions.

So, let’s complete an experiment where we can use the model POJO along with the h2o-genmodel.jar file to understand how we can use model POJOs in any environment with JVM. We shall write a Java program that imports the h2o-genmodel.jar file and uses it to load the model POJO into the program. Once the model POJO has been loaded, we will use it to make predictions on the sample data.

So, let’s start by creating a folder where we can keep the H2O POJO file needed for the experiment and then write some code that uses it. Follow these steps:

  1. Open your terminal and create an empty folder by executing the following command:
    mkdir H2O_POJO
    cd H2O_POJO
  2. Now, copy your model POJO file to the folder...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image