xgb 0.4.0 → 0.5.3

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: 0d128d5d386edca28045cf55d4cd246f68deee2bb8e4a26254b9549955d2d8d4
4
- data.tar.gz: 9e43a00b4b5f5f451ba7744effae622cfb404e67038de3881a6edfc5a776878a
3
+ metadata.gz: 3d7ca12a05dec9060ffa8a269b3fdfba5dbe176432e7ac3c9ad621f0f8e25571
4
+ data.tar.gz: d41db17d81b375bb9c51879f6a80446d713dac4ed892d7bfed3adecae071bd8e
5
5
  SHA512:
6
- metadata.gz: c7aaa6dd25ca9987621314b7ccee0b4fb029e0e6b70cce50a7fdaf9517c8896c6ad961b36b45af0ed2e6e2698bfd6d523a0fc623202cc058aa671821d9cec893
7
- data.tar.gz: 603488b7920eed380a8eb5ca3576e3d5a1f4b7ba9cdc8afa75c0385558606b7e2865c8ddb9c21db43725b3cf379f75beb8cba35cf92d7d4717c85fedc7bf8ccb
6
+ metadata.gz: 4173a8fe5cd5de6dbe252d3ffde2ecabc0556547ced64ab82e7dca7ab593a502d64402010590090ca0291264b0a03ce499ef4c16668e207a8f91076c1935b142
7
+ data.tar.gz: 961b1f5c10418d8ed5bf9de88ef0d43d1ae65edf92e0ce2d5e90a6f4dbbd2638a8a25b7ceb0edddc147e5f35a574ab383ef67c4388764ca4d4138a8bcfcf9f90
data/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## 0.5.3 (2021-05-12)
2
+
3
+ - Updated XGBoost to 1.4.0
4
+ - Added ARM shared library for Linux
5
+
6
+ ## 0.5.2 (2021-03-09)
7
+
8
+ - Added ARM shared library for Mac
9
+
10
+ ## 0.5.1 (2021-02-08)
11
+
12
+ - Fixed error with validation sets without early stopping
13
+
14
+ ## 0.5.0 (2020-12-12)
15
+
16
+ - Updated XGBoost to 1.3.0
17
+
18
+ ## 0.4.1 (2020-08-26)
19
+
20
+ - Updated XGBoost to 1.2.0
21
+
1
22
  ## 0.4.0 (2020-05-17)
2
23
 
3
24
  - Updated XGBoost to 1.1.0
data/NOTICE.txt CHANGED
@@ -1,4 +1,5 @@
1
- Copyright 2019-2020 Andrew Kane
1
+ Copyright XGBoost contributors
2
+ Copyright 2019-2021 Andrew Kane
2
3
 
3
4
  Licensed under the Apache License, Version 2.0 (the "License");
4
5
  you may not use this file except in compliance with the License.
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://travis-ci.org/ankane/xgboost.svg?branch=master)](https://travis-ci.org/ankane/xgboost) [![Build status](https://ci.appveyor.com/api/projects/status/s8umwyuahvj68m6p/branch/master?svg=true)](https://ci.appveyor.com/project/ankane/xgboost/branch/master)
5
+ [![Build Status](https://github.com/ankane/xgboost/workflows/build/badge.svg?branch=master)](https://github.com/ankane/xgboost/actions)
6
6
 
7
7
  ## Installation
8
8
 
@@ -137,10 +137,10 @@ Data can be an array of arrays
137
137
  [[1, 2, 3], [4, 5, 6]]
138
138
  ```
139
139
 
140
- Or a Numo NArray
140
+ Or a Numo array
141
141
 
142
142
  ```ruby
143
- Numo::DFloat.new(3, 2).seq
143
+ Numo::NArray.cast([[1, 2, 3], [4, 5, 6]])
144
144
  ```
145
145
 
146
146
  Or a Rover data frame
data/lib/xgboost.rb CHANGED
@@ -19,7 +19,22 @@ module XGBoost
19
19
  class << self
20
20
  attr_accessor :ffi_lib
21
21
  end
22
- lib_name = FFI.map_library_name("xgboost")
22
+ lib_name =
23
+ if Gem.win_platform?
24
+ "xgboost.dll"
25
+ elsif RbConfig::CONFIG["host_os"] =~ /darwin/i
26
+ if RbConfig::CONFIG["host_cpu"] =~ /arm/i
27
+ "libxgboost.arm64.dylib"
28
+ else
29
+ "libxgboost.dylib"
30
+ end
31
+ else
32
+ if RbConfig::CONFIG["host_cpu"] =~ /aarch64/i
33
+ "libxgboost.arm64.so"
34
+ else
35
+ "libxgboost.so"
36
+ end
37
+ end
23
38
  vendor_lib = File.expand_path("../vendor/#{lib_name}", __dir__)
24
39
  self.ffi_lib = [vendor_lib]
25
40
 
@@ -61,7 +76,7 @@ module XGBoost
61
76
  best_score = score
62
77
  best_iter = iteration
63
78
  best_message = message
64
- elsif iteration - best_iter >= early_stopping_rounds
79
+ elsif early_stopping_rounds && iteration - best_iter >= early_stopping_rounds
65
80
  booster.best_iteration = best_iter
66
81
  puts "Stopping. Best iteration:\n#{best_message}" if verbose_eval
67
82
  break
data/lib/xgboost/ffi.rb CHANGED
@@ -5,7 +5,7 @@ module XGBoost
5
5
  begin
6
6
  ffi_lib XGBoost.ffi_lib
7
7
  rescue LoadError => e
8
- if e.message.include?("Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib") && e.message.include?("Reason: image not found")
8
+ if ["/usr/local", "/opt/homebrew"].any? { |v| e.message.include?("Library not loaded: #{v}/opt/libomp/lib/libomp.dylib") } && e.message.include?("Reason: image not found")
9
9
  raise LoadError, "OpenMP not found. Run `brew install libomp`"
10
10
  else
11
11
  raise e
@@ -1,3 +1,3 @@
1
1
  module XGBoost
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.3"
3
3
  end
Binary file
Binary file
Binary file
data/vendor/libxgboost.so CHANGED
Binary file
data/vendor/xgboost.dll CHANGED
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.0
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-17 00:00:00.000000000 Z
11
+ date: 2021-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -24,92 +24,8 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: minitest
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '5'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '5'
69
- - !ruby/object:Gem::Dependency
70
- name: daru
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: numo-narray
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: rover-df
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- description:
112
- email: andrew@chartkick.com
27
+ description:
28
+ email: andrew@ankane.org
113
29
  executables: []
114
30
  extensions: []
115
31
  extra_rdoc_files: []
@@ -130,6 +46,8 @@ files:
130
46
  - lib/xgboost/utils.rb
131
47
  - lib/xgboost/version.rb
132
48
  - vendor/LICENSE
49
+ - vendor/libxgboost.arm64.dylib
50
+ - vendor/libxgboost.arm64.so
133
51
  - vendor/libxgboost.dylib
134
52
  - vendor/libxgboost.so
135
53
  - vendor/xgboost.dll
@@ -137,7 +55,7 @@ homepage: https://github.com/ankane/xgboost
137
55
  licenses:
138
56
  - Apache-2.0
139
57
  metadata: {}
140
- post_install_message:
58
+ post_install_message:
141
59
  rdoc_options: []
142
60
  require_paths:
143
61
  - lib
@@ -152,8 +70,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
70
  - !ruby/object:Gem::Version
153
71
  version: '0'
154
72
  requirements: []
155
- rubygems_version: 3.1.2
156
- signing_key:
73
+ rubygems_version: 3.2.3
74
+ signing_key:
157
75
  specification_version: 4
158
76
  summary: High performance gradient boosting for Ruby
159
77
  test_files: []