Gradient Boosting Regression Trees implementation — screenshot of github.com

Gradient Boosting Regression Trees implementation

Leaves is a pure Go library for prediction with Gradient Boosting Regression Trees models from LightGBM, XGBoost, and scikit-learn. It enables Go applications to use these models without C bindings, offering competitive performance for parallel batch predictions.

Visit github.com →

Questions & Answers

What is leaves?
Leaves is a pure Go library that implements prediction code for Gradient Boosting Regression Trees (GBRT) models. It allows Go programs to utilize models trained in popular GBRT frameworks like LightGBM and XGBoost without requiring C API bindings.
Who would use the leaves library?
Leaves is intended for Go developers and machine learning engineers who need to deploy GBRT models in Go applications. It's particularly useful for those who want to avoid C bindings or build high-performance, parallel prediction services in Go.
How does leaves compare to using C API bindings for GBRT models?
Leaves differentiates itself by providing a pure Go implementation for GBRT model prediction, eliminating the need for C API bindings. This simplifies deployment in Go environments and can offer competitive prediction speeds, as shown in benchmarks against C API implementations.
When should I use leaves for GBRT model predictions?
You should use leaves when you need to integrate pre-trained LightGBM, XGBoost, or scikit-learn GBRT models into a Go application. It's ideal for scenarios requiring fast, parallel predictions for batches of data within a Go ecosystem.
What GBRT model formats does leaves support?
Leaves supports reading LightGBM models from text and JSON formats, XGBoost models from binary format, and scikit-learn tree models from pickle format (protocol 0). It handles various model types like gbdt, rf, dart, and gblinear.