xgb 0.7.2 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c46410ed4eb63b3c1e46f21f83868c13cc65a756342e31ad800cd9c725a8670a
4
- data.tar.gz: 269c6ebdccf81803c6d63c67a4e1ea2ed229ed6c33565ce86faa08496f9dafd2
3
+ metadata.gz: a3c5776d18623264345b660a8c69a88f1ceee3138ff25b8b4378702956e393bb
4
+ data.tar.gz: a2656e280e6efeefaac2c70a6cdefc54f700c12023d0e00d47967029d75af8b3
5
5
  SHA512:
6
- metadata.gz: 3e4128bb701257c37d44c08a86eca7b3504f6fdb1095a20c7f10d9c08944a70002f303bf5eae2c66df1ca07d56efc8a001635c89a2969859acb4fbf52d698f1d
7
- data.tar.gz: 29b41435403dab429e9ef87616d051039bbcec872b0a665e9fc1402411ed51bcd61c061ddaceda74e7da1db45c39a1703467ef0b4f916b407a1d8d4eaa8bebaa
6
+ metadata.gz: fbfc62217eee5ed8e3fca644db86908039f1bc40bb6156e8a219baec5ac4230e1fda9f200b3f991cf6683bcd74323e00c50e5c54468bc02e85f2f8399030c410
7
+ data.tar.gz: 5badc8c673ebae251cef2eaa8e595a1434572737c465e597595c1c323201db01fcc1db862416a6c1a4f87e95ba948dc76ec1851ae3e865fb8c539439340043d9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 0.8.0 (2023-09-13)
2
+
3
+ - Updated XGBoost to 2.0.0
4
+ - Dropped support for Ruby < 3
5
+
6
+ ## 0.7.3 (2023-07-24)
7
+
8
+ - Fixed error with `dup` and `clone`
9
+
1
10
  ## 0.7.2 (2023-05-12)
2
11
 
3
12
  - Updated XGBoost to 1.7.5
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
- [![Build Status](https://github.com/ruby-ml/xgboost-ruby/workflows/build/badge.svg?branch=master)](https://github.com/ruby-ml/xgboost-ruby/actions)
5
+ [![Build Status](https://github.com/ankane/xgboost-ruby/workflows/build/badge.svg?branch=master)](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/ruby-ml/xgboost-ruby/blob/master/CHANGELOG.md)
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/ruby-ml/xgboost-ruby/issues)
183
- - Fix bugs and [submit pull requests](https://github.com/ruby-ml/xgboost-ruby/pulls)
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/ruby-ml/xgboost-ruby.git
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
@@ -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(self, self.class.finalize(handle_pointer))
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(pointer)
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)
@@ -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(self, self.class.finalize(handle_pointer))
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(pointer)
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
@@ -1,6 +1,6 @@
1
1
  module XGBoost
2
2
  class Ranker < Model
3
- def initialize(n_estimators: 100, objective: "rank:pairwise", importance_type: "gain", **options)
3
+ def initialize(objective: "rank:ndcg", **options)
4
4
  super
5
5
  end
6
6
 
@@ -1,3 +1,3 @@
1
1
  module XGBoost
2
- VERSION = "0.7.2"
2
+ VERSION = "0.8.0"
3
3
  end
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.7.2
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-05-13 00:00:00.000000000 Z
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/ruby-ml/xgboost-ruby
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: '2.7'
84
+ version: '3'
85
85
  required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="