https://github.com/getumen/go-treelite
treelite runtime binding in Go
https://github.com/getumen/go-treelite
golang machine-learning
Last synced: 6 months ago
JSON representation
treelite runtime binding in Go
- Host: GitHub
- URL: https://github.com/getumen/go-treelite
- Owner: getumen
- License: apache-2.0
- Created: 2022-07-06T15:28:52.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-27T18:20:42.000Z (about 2 years ago)
- Last Synced: 2024-06-19T20:51:53.188Z (about 2 years ago)
- Topics: golang, machine-learning
- Language: Go
- Homepage:
- Size: 375 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-treelite: [TreeLite](https://github.com/dmlc/treelite) binding in Go
[](https://goreportcard.com/report/github.com/getumen/go-treelite)
[](https://github.com/getumen/go-treelite/actions/workflows/codeql-analysis.yml)
[](https://github.com/getumen/go-treelite/actions/workflows/go.yml)
[](https://pkg.go.dev/github.com/getumen/go-treelite)
- [go-treelite: TreeLite binding in Go](#go-treelite-treelite-binding-in-go)
- [Prerequirements](#prerequirements)
- [install treelite](#install-treelite)
- [1. install packages to install treelite](#1-install-packages-to-install-treelite)
- [2. install treelite](#2-install-treelite)
- [Usage](#usage)
- [Documentation](#documentation)
This binding currently works for treelite 3.4.0.
## Prerequirements
### install treelite
install treelite (see [.devcontainer/Dockerfile](.devcontainer/Dockerfile))
#### 1. install packages to install treelite
the following package is installed.
- g++
- cmake
- make
#### 2. install treelite
```bash
git clone https://github.com/dmlc/treelite.git -b 3.4.0
cd treelite \
mkdir build && cd build \
cmake .. \
sudo make install \
export LIBRARY_PATH=/usr/local/lib${LIBRARY_PATH:+:$LIBRARY_PATH}
export LD_LIBRARY_PATH=/usr/local/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
```
## Usage
Add this library to your project.
```bash
go get github.com/getumen/go-treelite
```
## Documentation
The documentation is hosted at [here](https://pkg.go.dev/github.com/getumen/go-treelite). You can also take a look at [example_test.go](example_test.go).