https://github.com/mirecl/leaves-rs
πΏ Leaves is a library implementing prediction code GBRT (Gradient Boosting Regression Trees) for inference models from popular ML-frameworks on Pure Rust π¦
https://github.com/mirecl/leaves-rs
Last synced: 6 months ago
JSON representation
πΏ Leaves is a library implementing prediction code GBRT (Gradient Boosting Regression Trees) for inference models from popular ML-frameworks on Pure Rust π¦
- Host: GitHub
- URL: https://github.com/mirecl/leaves-rs
- Owner: mirecl
- License: mit
- Created: 2024-11-18T06:38:49.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-14T12:10:11.000Z (over 1 year ago)
- Last Synced: 2025-11-06T03:19:12.905Z (9 months ago)
- Language: Rust
- Homepage:
- Size: 200 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://crates.io/crates/leaves-rs) 
# πΏ leaves-rs
πΏ Leaves is a library implementing prediction code for GBRT (Gradient Boosting Regression Trees).\
The goal of the project - make it possible to inference models from popular ML-frameworks on **Pure Rust** π¦.
### π Install library
Run the following Cargo command in your project directory:
```sh
cargo add leaves-rs
```
Or add the following line to your **Cargo.toml**:
```toml
leaves-rs = "0.0.1"
```
### π Proposal API for LightGBM
+ Import library for example `LGBMClassifier`:
```rust
use leaves::LGBMClassifier;
```
+ Load models:
```rust
let model = LGBMClassifier::from_file("model.bin");
```
+ Predict models:
```rust
// Create features vector.
let features = vec![1.0, 2.0, 3.0];
// Inference model `Classifier`.
let preds = model.predict(features);
let preds_proba = model.predict_proba(features);
```
> βThe models `LGBMRegressor` and `LGBMRanker` will be executed in a similar manner.
### π€ Supported framework
+ [ ] LightGBM () (in progress π‘)
+ [ ] XGBoost ()
+ [ ] CatBoost ()
+ [ ] Scikit-Learn ()
### π«΅ Usage
+ [Regression](examples/regression)
+ [Titanic](examples/titanic)
### π Thanks
+ [@dmitryikh](https://github.com/dmitryikh) for