Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

LightGBM Rust binding

License

NotificationsYou must be signed in to change notification settings

postgresml/lightgbm-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LightGBM Rust binding

Require

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

  1. Install CMake and VS Build Tools.
  2. Install LLVM and set an environment variableLIBCLANG_PATH to PATH_TO_LLVM_BINARY (example:C:\Program Files\LLVM\bin)

Please see below for details.

Usage

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, &params).unwrap();

Please see the./examples for details.

examplelink
binary classificationlink
multiclass classificationlink
regressionlink

Develop

git clone --recursive https://github.com/vaaaaanquish/lightgbm-rs
docker build -t lgbmrs .docker run -it -v $PWD:/app lgbmrs bash# cargo build

Thanks

Much reference was made to implementation and documentation. Thanks.

About

LightGBM Rust binding

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust99.5%
  • Other0.5%

[8]ページ先頭

©2009-2025 Movatter.jp