Giter Site home page Giter Site logo

litao-wrk / jpmml-lightgbm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jpmml/jpmml-lightgbm

0.0 2.0 0.0 3.19 MB

Java library and command-line application for converting LightGBM models to PMML

License: GNU Affero General Public License v3.0

Java 89.59% R 1.52% Python 8.88%

jpmml-lightgbm's Introduction

JPMML-LightGBM

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

Prerequisites

  • LightGBM 2.0.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-lightgbm-executable-1.2-SNAPSHOT.jar.

Usage

A typical workflow can be summarized as follows:

  1. Use LightGBM to train a model.
  2. Save the model to a text file in a local filesystem.
  3. Use the JPMML-LightGBM command-line converter application to turn this text file to a PMML file.

The LightGBM side of operations

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

from sklearn.datasets import load_boston

boston = load_boston()

from lightgbm import LGBMRegressor

lgbm = LGBMRegressor(objective = "regression")
lgbm.fit(boston.data, boston.target, feature_name = boston.feature_names)

lgbm.booster_.save_model("lightgbm.txt")

The JPMML-LightGBM side of operations

Converting the text file lightgbm.txt to a PMML file lightgbm.pmml:

java -jar target/jpmml-lightgbm-executable-1.2-SNAPSHOT.jar --lgbm-input lightgbm.txt --pmml-output lightgbm.pmml

Getting help:

java -jar target/jpmml-lightgbm-executable-1.2-SNAPSHOT.jar --help

License

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

Additional information

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

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

jpmml-lightgbm's People

Contributors

vruusmann avatar

Watchers

James Cloos avatar  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.