xgb 0.7.2 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +5 -5
- data/lib/xgboost/booster.rb +3 -3
- data/lib/xgboost/dmatrix.rb +3 -3
- data/lib/xgboost/ranker.rb +1 -1
- data/lib/xgboost/version.rb +1 -1
- data/vendor/aarch64-linux/libxgboost.so +0 -0
- data/vendor/arm64-darwin/libxgboost.dylib +0 -0
- data/vendor/x64-mingw/xgboost.dll +0 -0
- data/vendor/x86_64-darwin/libxgboost.dylib +0 -0
- data/vendor/x86_64-linux/libxgboost.so +0 -0
- data/vendor/x86_64-linux-musl/libxgboost.so +0 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3c5776d18623264345b660a8c69a88f1ceee3138ff25b8b4378702956e393bb
|
4
|
+
data.tar.gz: a2656e280e6efeefaac2c70a6cdefc54f700c12023d0e00d47967029d75af8b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbfc62217eee5ed8e3fca644db86908039f1bc40bb6156e8a219baec5ac4230e1fda9f200b3f991cf6683bcd74323e00c50e5c54468bc02e85f2f8399030c410
|
7
|
+
data.tar.gz: 5badc8c673ebae251cef2eaa8e595a1434572737c465e597595c1c323201db01fcc1db862416a6c1a4f87e95ba948dc76ec1851ae3e865fb8c539439340043d9
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[XGBoost](https://github.com/dmlc/xgboost) - high performance gradient boosting - for Ruby
|
4
4
|
|
5
|
-
[](https://github.com/ankane/xgboost-ruby/actions)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -173,21 +173,21 @@ Thanks to the [xgboost](https://github.com/PairOnAir/xgboost-ruby) gem for showi
|
|
173
173
|
|
174
174
|
## History
|
175
175
|
|
176
|
-
View the [changelog](https://github.com/
|
176
|
+
View the [changelog](https://github.com/ankane/xgboost-ruby/blob/master/CHANGELOG.md)
|
177
177
|
|
178
178
|
## Contributing
|
179
179
|
|
180
180
|
Everyone is encouraged to help improve this project. Here are a few ways you can help:
|
181
181
|
|
182
|
-
- [Report bugs](https://github.com/
|
183
|
-
- Fix bugs and [submit pull requests](https://github.com/
|
182
|
+
- [Report bugs](https://github.com/ankane/xgboost-ruby/issues)
|
183
|
+
- Fix bugs and [submit pull requests](https://github.com/ankane/xgboost-ruby/pulls)
|
184
184
|
- Write, clarify, or fix documentation
|
185
185
|
- Suggest or add new features
|
186
186
|
|
187
187
|
To get started with development:
|
188
188
|
|
189
189
|
```sh
|
190
|
-
git clone https://github.com/
|
190
|
+
git clone https://github.com/ankane/xgboost-ruby.git
|
191
191
|
cd xgboost-ruby
|
192
192
|
bundle install
|
193
193
|
bundle exec rake vendor:all
|
data/lib/xgboost/booster.rb
CHANGED
@@ -5,7 +5,7 @@ module XGBoost
|
|
5
5
|
def initialize(params: nil, model_file: nil)
|
6
6
|
@handle = ::FFI::MemoryPointer.new(:pointer)
|
7
7
|
check_result FFI.XGBoosterCreate(nil, 0, @handle)
|
8
|
-
ObjectSpace.define_finalizer(
|
8
|
+
ObjectSpace.define_finalizer(@handle, self.class.finalize(handle_pointer.to_i))
|
9
9
|
|
10
10
|
if model_file
|
11
11
|
check_result FFI.XGBoosterLoadModel(handle_pointer, model_file)
|
@@ -15,9 +15,9 @@ module XGBoost
|
|
15
15
|
set_param(params)
|
16
16
|
end
|
17
17
|
|
18
|
-
def self.finalize(
|
18
|
+
def self.finalize(addr)
|
19
19
|
# must use proc instead of stabby lambda
|
20
|
-
proc { FFI.XGBoosterFree(pointer) }
|
20
|
+
proc { FFI.XGBoosterFree(::FFI::Pointer.new(:pointer, addr)) }
|
21
21
|
end
|
22
22
|
|
23
23
|
def update(dtrain, iteration)
|
data/lib/xgboost/dmatrix.rb
CHANGED
@@ -52,7 +52,7 @@ module XGBoost
|
|
52
52
|
end
|
53
53
|
check_result FFI.XGDMatrixCreateFromMat(c_data, nrow, ncol, missing, @handle)
|
54
54
|
|
55
|
-
ObjectSpace.define_finalizer(
|
55
|
+
ObjectSpace.define_finalizer(@handle, self.class.finalize(handle_pointer.to_i))
|
56
56
|
|
57
57
|
@feature_names ||= ncol.times.map { |i| "f#{i}" }
|
58
58
|
end
|
@@ -61,9 +61,9 @@ module XGBoost
|
|
61
61
|
self.weight = weight if weight
|
62
62
|
end
|
63
63
|
|
64
|
-
def self.finalize(
|
64
|
+
def self.finalize(addr)
|
65
65
|
# must use proc instead of stabby lambda
|
66
|
-
proc { FFI.XGDMatrixFree(pointer) }
|
66
|
+
proc { FFI.XGDMatrixFree(::FFI::Pointer.new(:pointer, addr)) }
|
67
67
|
end
|
68
68
|
|
69
69
|
def label
|
data/lib/xgboost/ranker.rb
CHANGED
data/lib/xgboost/version.rb
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xgb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -69,7 +69,7 @@ files:
|
|
69
69
|
- vendor/x86_64-linux/LICENSE-rabit.txt
|
70
70
|
- vendor/x86_64-linux/LICENSE-xgboost.txt
|
71
71
|
- vendor/x86_64-linux/libxgboost.so
|
72
|
-
homepage: https://github.com/
|
72
|
+
homepage: https://github.com/ankane/xgboost-ruby
|
73
73
|
licenses:
|
74
74
|
- Apache-2.0
|
75
75
|
metadata: {}
|
@@ -81,7 +81,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
81
81
|
requirements:
|
82
82
|
- - ">="
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
version: '
|
84
|
+
version: '3'
|
85
85
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|