forked fromvaaaaanquish/lightgbm-rs
- Notifications
You must be signed in to change notification settings - Fork2
postgresml/lightgbm-rs
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
LightGBM Rust binding
You need an environment that can build LightGBM.
# linuxapt install -y cmake libclang-dev libc++-dev gcc-multilib# OS Xbrew install cmake libomp
On Windows
- Install CMake and VS Build Tools.
- Install LLVM and set an environment variable
LIBCLANG_PATH
to PATH_TO_LLVM_BINARY (example:C:\Program Files\LLVM\bin
)
Please see below for details.
Example LightGBM train.
extern crate serde_json;use lightgbm::{Dataset, Booster};use serde_json::json;let data = vec![vec![1.0, 0.1, 0.2, 0.1], vec![0.7, 0.4, 0.5, 0.1], vec![0.9, 0.8, 0.5, 0.1], vec![0.2, 0.2, 0.8, 0.7], vec![0.1, 0.7, 1.0, 0.9]];let label = vec![0.0, 0.0, 0.0, 1.0, 1.0];let dataset = Dataset::from_mat(data, label).unwrap();let params = json!{ { "num_iterations": 3, "objective": "binary", "metric": "auc" }};let bst = Booster::train(dataset, ¶ms).unwrap();
Please see the./examples
for details.
example | link |
---|---|
binary classification | link |
multiclass classification | link |
regression | link |
git clone --recursive https://github.com/vaaaaanquish/lightgbm-rs
docker build -t lgbmrs .docker run -it -v $PWD:/app lgbmrs bash# cargo build
Much reference was made to implementation and documentation. Thanks.
About
LightGBM Rust binding
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Languages
- Rust99.5%
- Other0.5%