Giter Club home page Giter Club logo

jpmml-h2o's Introduction

JPMML-H2O

Java library and command-line application for converting H2O.ai models to PMML.

Features

Prerequisites

  • H2O 3.16.0 or newer
  • Java 1.8 or newer

Installation

Enter the project root directory and build using Apache Maven:

mvn clean install

The build produces an executable uber-JAR file target/jpmml-h2o-executable-1.0-SNAPSHOT.jar.

Usage

A typical workflow can be summarized as follows:

  1. Use H2O to train a model.
  2. Download the model in Model ObJect, Optimized (MOJO) data format to a file in a local filesystem.
  3. Use the JPMML-H2O command-line converter application to turn the MOJO file to a PMML file.

The H2O side of operations

Using the h2o package to train a regression model for the example Boston housing dataset:

from h2o import H2OFrame
from h2o.estimators.glm import H2OGeneralizedLinearEstimator
from pandas import DataFrame, Series
from sklearn.datasets import load_boston

import h2o
import pandas

boston = load_boston()

df = pandas.concat((DataFrame(data = boston.data, columns = boston.feature_names), Series(boston.target, name = "MEDV")), axis = 1)

h2o.connect()

df = H2OFrame(df)

glm = H2OGeneralizedLinearEstimator(family = "gaussian")
glm.train(boston.feature_names.tolist(), "MEDV", df)

glm.download_mojo(path = "mojo.zip")

The Java side of operations

Converting the MOJO file mojo.zip to a PMML file mojo.pmml:

java -jar target/jpmml-h2o-executable-1.0-SNAPSHOT.jar --mojo-input mojo.zip --pmml-output mojo.pmml

Getting help:

java -jar target/jpmml-h2o-executable-1.0-SNAPSHOT.jar --help

License

JPMML-H2O is dual-licensed under the GNU Affero General Public License (AGPL) version 3.0, and a commercial license.

Additional information

JPMML-H2O is developed and maintained by Openscoring Ltd, Estonia.

Interested in using JPMML software in your application? Please contact [email protected]

jpmml-h2o's People

Contributors

vruusmann avatar jfbogusz avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.