lightgbm 0.4.1 → 0.4.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f33ce6cd6f5c99b5227aaab5b76a97827dd46354de058b21fcbd19e2835167bc
4
- data.tar.gz: cc45ed02c4e07adfab3676d0bd076a6c3e3fbf9904e36d8a8576734447382ae6
3
+ metadata.gz: 64101c493236ac58ca8b8f97ecf1c70ba43015b5b887acdd5cfbed81b774150c
4
+ data.tar.gz: 431e9dcb0195569c789cab6a7d0965d376e7f8a0cb9180b91ef15bffc01687da
5
5
  SHA512:
6
- metadata.gz: 70ddf6cf10bb3bd7e3c41403548b9b99f5b10df38baf42261744ce33c12a6d36e0f633ba1c7e8129cde4540f78f0357fadeb1a1f5acedd2b87a4825decfc3af3
7
- data.tar.gz: ca56120cb9430526b097a402247be4eb9911b427d189284513815a04a6bd4a32b1da219b27cc5a3a4c1775510f92e4fdc9ff78f9884216fcb4a2aaa18496437e
6
+ metadata.gz: f5dee99b1867e74d6fd8fce92cde1edb91e933a9cc1aee909dba1c1e42b6c52f1627142c861660b0110b9fb72de3b55efe3d58ba3fc49fa9a87ed06efe4ccc91
7
+ data.tar.gz: 14863d6bd6f46b5df05c073c25a16c6358941fd1a480c43548257dc46124424e1280dfd5d9d431bd96b267003b0bd02d2e9d12fa1359bd3d9fa029a99ae68388
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.4.2 (2025-06-23)
2
+
3
+ - Improved performance of `predict` method for `pandas_categorical`
4
+
1
5
  ## 0.4.1 (2025-02-17)
2
6
 
3
7
  - Updated LightGBM to 4.6.0
@@ -269,7 +269,8 @@ module LightGBM
269
269
  last_line = model_str[idx..].strip
270
270
  end
271
271
  if last_line.start_with?(pandas_key)
272
- JSON.parse(last_line[pandas_key.length..])
272
+ pandas_categorical = JSON.parse(last_line[pandas_key.length..])
273
+ pandas_categorical.map { |cats| cats.each_with_index.to_h }
273
274
  end
274
275
  end
275
276
 
@@ -140,7 +140,7 @@ module LightGBM
140
140
 
141
141
  def apply_pandas_categorical(data, categorical_feature, pandas_categorical)
142
142
  (categorical_feature || []).each_with_index do |cf, i|
143
- cat_codes = pandas_categorical[i].map.with_index.to_h
143
+ cat_codes = pandas_categorical[i]
144
144
  data.each do |r|
145
145
  cat = r[cf]
146
146
  unless cat.nil?
@@ -1,3 +1,3 @@
1
1
  module LightGBM
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lightgbm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-17 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: ffi
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  requirements: []
69
- rubygems_version: 3.6.2
69
+ rubygems_version: 3.6.7
70
70
  specification_version: 4
71
71
  summary: High performance gradient boosting for Ruby
72
72
  test_files: []