Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: davechallis/rust-xgboost
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: postgresml/rust-xgboost
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.

Commits on Apr 29, 2024

  1. Use v1.62

    levkk authored and Montana Low committed Apr 29, 2024
    Copy the full SHA
    103bc84 View commit details
  2. Use Path

    levkk authored and Montana Low committed Apr 29, 2024
    Copy the full SHA
    0575c85 View commit details
  3. Copy the full SHA
    16e0e76 View commit details
  4. make cuda a feature

    Montana Low committed Apr 29, 2024
    Copy the full SHA
    5b33ede View commit details
  5. re-export feature

    Montana Low committed Apr 29, 2024
    Copy the full SHA
    21e5ae3 View commit details
  6. update derive

    Montana Low committed Apr 29, 2024
    Copy the full SHA
    c772eea View commit details
  7. it really is 126

    Montana Low committed Apr 29, 2024
    Copy the full SHA
    832979e View commit details
  8. Expose set_param

    levkk authored and Montana Low committed Apr 29, 2024
    Copy the full SHA
    e5a94b4 View commit details
  9. static link

    Montana Low committed Apr 29, 2024
    Copy the full SHA
    0019487 View commit details
  10. Just public

    levkk authored and Montana Low committed Apr 29, 2024
    Copy the full SHA
    50d0533 View commit details
  11. Manually include c++11 paths

    levkk authored and Montana Low committed Apr 29, 2024
    Copy the full SHA
    9693f8e View commit details
  12. diff

    levkk authored and Montana Low committed Apr 29, 2024
    Copy the full SHA
    0544081 View commit details
  13. fix: can not build in rhel8 centos8

    Signed-off-by: yihong0618 <zouzou0208@gmail.com>
    yihong0618 authored and Montana Low committed Apr 29, 2024
    Copy the full SHA
    b2b8af6 View commit details
  14. XGBoost Mac compile

    levkk authored and Montana Low committed Apr 29, 2024
    Copy the full SHA
    fd6aedf View commit details
  15. bad commit

    levkk authored and Montana Low committed Apr 29, 2024
    Copy the full SHA
    65fd5f0 View commit details
  16. Updated bindgen version to fix build bug

    SilasMarvin authored and Montana Low committed Apr 29, 2024
    Copy the full SHA
    d10eee9 View commit details
  17. checkpoint

    montanalow authored and Montana Low committed Apr 29, 2024
    Copy the full SHA
    9e52e20 View commit details
  18. checkpoint

    montanalow authored and Montana Low committed Apr 29, 2024
    Copy the full SHA
    ad253b4 View commit details
  19. checkpoint

    montanalow authored and Montana Low committed Apr 29, 2024
    Copy the full SHA
    3e536dd View commit details
  20. wut wut

    montanalow authored and Montana Low committed Apr 29, 2024
    Copy the full SHA
    e33922d View commit details
  21. binary

    montanalow authored and Montana Low committed Apr 29, 2024
    Copy the full SHA
    247b262 View commit details
  22. tests pass

    montanalow authored and Montana Low committed Apr 29, 2024
    Copy the full SHA
    60074af View commit details
  23. bump version, fix c++ stdlib bindgen (un)support

    Montana Low committed Apr 29, 2024
    Copy the full SHA
    0307a92 View commit details
  24. removed upstream dmlc/xgboost/pull/6505

    Montana Low committed Apr 29, 2024
    Copy the full SHA
    ffa1b73 View commit details
  25. removed upstream dmlc/xgboost/pull/6505

    Montana Low committed Apr 29, 2024
    Copy the full SHA
    f81944d View commit details
  26. intel/m1 compatibility

    Montana Low committed Apr 29, 2024
    Copy the full SHA
    1da1c03 View commit details
  27. Merge pull request #11 from postgresml/montana/build

    intel/m1 compatibility
    montanalow authored Apr 29, 2024
    Copy the full SHA
    a11d05d View commit details
  28. Update README.md

    Update version
    montanalow authored Apr 29, 2024
    Copy the full SHA
    767f0ea View commit details

Commits on Oct 8, 2024

  1. Fix the NaN recall in xgboost training: Update the tag of xgboost to …

    …v2.0.3; Add train code in train iteration; Passed all examples.
    cyccbxhl authored and huanjin.cb committed Oct 8, 2024
    Copy the full SHA
    51e606a View commit details
  2. Tested successfully on MAC as well.

    cyccbxhl authored and huanjin.cb committed Oct 8, 2024
    Copy the full SHA
    cc976b2 View commit details

Commits on Oct 10, 2024

  1. Merge pull request #12 from cyccbxhl/master

    Fix the NaN recall in xgboost training
    montanalow authored Oct 10, 2024
    Copy the full SHA
    747631d View commit details

Commits on Jan 23, 2025

  1. Updated to use c++17

    SilasMarvin committed Jan 23, 2025
    Copy the full SHA
    244d553 View commit details
  2. Cleanup

    SilasMarvin committed Jan 23, 2025
    Copy the full SHA
    60e832f View commit details
  3. Cleanup

    SilasMarvin committed Jan 23, 2025
    Copy the full SHA
    07a6a4a View commit details
  4. Merge pull request #13 from postgresml/silas/cxx17

    Updated to use c++17
    SilasMarvin authored Jan 23, 2025
    Copy the full SHA
    0e3d9c7 View commit details

Commits on Jan 27, 2025

  1. add reqs to README

    kczimm committed Jan 27, 2025
    Copy the full SHA
    d851631 View commit details

Commits on Jan 29, 2025

  1. update for 2021 edition

    Montana Low committed Jan 29, 2025
    Copy the full SHA
    ec745a4 View commit details
  2. rabit checkpoints removed upstream

    Montana Low committed Jan 29, 2025
    Copy the full SHA
    98604a0 View commit details
  3. fmt

    Montana Low committed Jan 29, 2025
    Copy the full SHA
    4f0f358 View commit details
  4. Merge pull request #14 from postgresml/montana/build

    update for 2021 edition
    montanalow authored Jan 29, 2025
    Copy the full SHA
    fa91b55 View commit details
3 changes: 1 addition & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[submodule "xgboost-sys/xgboost"]
path = xgboost-sys/xgboost
url = https://github.com/davechallis/xgboost
branch = master
url = https://github.com/dmlc/xgboost
12 changes: 8 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -8,11 +8,15 @@ homepage = "https://github.com/davechallis/rust-xgboost"
description = "Machine learning using XGBoost"
documentation = "https://docs.rs/xgboost"
readme = "README.md"
edition = "2021"

[dependencies]
xgboost-sys = "0.2.0"
xgboost-sys = { path = "xgboost-sys" }
libc = "0.2"
derive_builder = "0.5"
derive_builder = "0.20"
log = "0.4"
tempfile = "3.0"
indexmap = "1.0"
tempfile = "3.15"
indexmap = "2.7"

[features]
cuda = ["xgboost-sys/cuda"]
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,12 @@

Rust bindings for the [XGBoost](https://xgboost.ai) gradient boosting library.

## Requirements

- Clang v16.0.0

## Documentation

* [Documentation](https://docs.rs/xgboost)

Basic usage example:
@@ -81,7 +87,7 @@ more detailed examples of different features.
Currently in a very early stage of development, so the API is changing as usability issues occur,
or new features are supported.

Builds against XGBoost 0.81.
Builds against XGBoost 2.0.3.

### Platforms

10 changes: 5 additions & 5 deletions examples/basic/src/main.rs
Original file line number Diff line number Diff line change
@@ -12,9 +12,9 @@ fn main() {

// load train and test matrices from text files (in LibSVM format).
println!("Loading train and test matrices...");
let dtrain = DMatrix::load("../../xgboost-sys/xgboost/demo/data/agaricus.txt.train").unwrap();
let dtrain = DMatrix::load(r#"{"uri": "../../xgboost-sys/xgboost/demo/data/agaricus.txt.train?format=libsvm"}"#).unwrap();
println!("Train matrix: {}x{}", dtrain.num_rows(), dtrain.num_cols());
let dtest = DMatrix::load("../../xgboost-sys/xgboost/demo/data/agaricus.txt.test").unwrap();
let dtest = DMatrix::load(r#"{"uri": "../../xgboost-sys/xgboost/demo/data/agaricus.txt.test?format=libsvm"}"#).unwrap();
println!("Test matrix: {}x{}", dtest.num_rows(), dtest.num_cols());

// configure objectives, metrics, etc.
@@ -66,15 +66,15 @@ fn main() {

// save and load model file
println!("\nSaving and loading Booster model...");
booster.save("xgb.model").unwrap();
let booster = Booster::load("xgb.model").unwrap();
booster.save("xgb.json").unwrap();
let booster = Booster::load("xgb.json").unwrap();
let preds2 = booster.predict(&dtest).unwrap();
assert_eq!(preds, preds2);

// save and load data matrix file
println!("\nSaving and loading matrix data...");
dtest.save("test.dmat").unwrap();
let dtest2 = DMatrix::load("test.dmat").unwrap();
let dtest2 = DMatrix::load_binary("test.dmat").unwrap();
assert_eq!(booster.predict(&dtest2).unwrap(), preds);

// error handling example
4 changes: 2 additions & 2 deletions examples/custom_objective/src/main.rs
Original file line number Diff line number Diff line change
@@ -6,8 +6,8 @@ use xgboost::{parameters, DMatrix, Booster};
fn main() {
// load train and test matrices from text files (in LibSVM format)
println!("Custom objective example...");
let dtrain = DMatrix::load("../../xgboost-sys/xgboost/demo/data/agaricus.txt.train").unwrap();
let dtest = DMatrix::load("../../xgboost-sys/xgboost/demo/data/agaricus.txt.test").unwrap();
let dtrain = DMatrix::load(r#"{"uri": "../../xgboost-sys/xgboost/demo/data/agaricus.txt.train?format=libsvm"}"#).unwrap();
let dtest = DMatrix::load(r#"{"uri": "../../xgboost-sys/xgboost/demo/data/agaricus.txt.test?format=libsvm"}"#).unwrap();

// specify datasets to evaluate against during training
let evaluation_sets = [(&dtest, "test"), (&dtrain, "train")];
4 changes: 2 additions & 2 deletions examples/generalised_linear_model/src/main.rs
Original file line number Diff line number Diff line change
@@ -12,8 +12,8 @@ fn main() {

// load train and test matrices from text files (in LibSVM format)
println!("Custom objective example...");
let dtrain = DMatrix::load("../../xgboost-sys/xgboost/demo/data/agaricus.txt.train").unwrap();
let dtest = DMatrix::load("../../xgboost-sys/xgboost/demo/data/agaricus.txt.test").unwrap();
let dtrain = DMatrix::load(r#"{"uri": "../../xgboost-sys/xgboost/demo/data/agaricus.txt.train?format=libsvm"}"#).unwrap();
let dtest = DMatrix::load(r#"{"uri": "../../xgboost-sys/xgboost/demo/data/agaricus.txt.test?format=libsvm"}"#).unwrap();

// configure objectives, metrics, etc.
let learning_params = parameters::learning::LearningTaskParametersBuilder::default()
2 changes: 2 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
max_width = 120
single_line_if_else_max_width = 80
Loading