Regression in H2O

We will first show how regression can be done in H2O. We will use the same dataset as we used earlier with MLlib, the Boston house prices, and predict the cost of the houses. The complete code can be found at GitHub: Chapter08/boston_price_h2o.ipynb:

  1. The necessary modules for the task are as follows:
import h2oimport timeimport seabornimport itertoolsimport numpy as npimport pandas as pdimport seaborn as snsimport matplotlib.pyplot as pltfrom h2o.estimators.glm import H2OGeneralizedLinearEstimator as GLMfrom h2o.estimators.gbm import H2OGradientBoostingEstimator as GBMfrom h2o.estimators.random_forest import H2ORandomForestEstimator as RF%matplotlib inline
  1. After importing the necessary modules, the first step is starting ...

Get Hands-On Artificial Intelligence for IoT now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.