rumale-linear_model 0.28.0 → 0.29.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 928168740565c9efd716841ef5a6901296182de1282706b093f287871cf80da5
4
- data.tar.gz: 5e42d83b8a8a34dc68a0e2bbca71bd5e94f5a24ada21b03d24f548ff9d0c0c21
3
+ metadata.gz: cc6c5d320ed04274b92e393a66f5b40ac24ce1889191aa9c19602c98e944b265
4
+ data.tar.gz: 44746c38b9c4caf13e625fa91a2d62800698d11f90fa09f060a51066998c19e2
5
5
  SHA512:
6
- metadata.gz: b60d55f537d29da22f76355347f11b3def138e177befd0e37fae1d513285aebe951f582cbf428ca6d562deb5ba77c932d780cb3c9b3250eb3c5dbb1591a44168
7
- data.tar.gz: 4e0661211522fe86613919331723761eaf35cc8f51d14d1b5351cd3d3975fe4a1bdc9430f36c57f92b635daa079896ea05942400cacdbfaf4af3523740c8827f
6
+ metadata.gz: aa76f6bf953a5b426881183aafef7608c1b49573e86d415e3c81194773544066dcc51ffcd9675bd8f203833261bc402ea1468d2ce19ff95b817c1f846179c79e
7
+ data.tar.gz: d7875bd2808b7180217c51ac7f0250d8bc702b27ea2409f3f7b1862fdae4cb377175b62a264ebd6233d65cdf9b0c1e79fac325bcc3fb62c1c01f1fb6f4b82e13
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2022-2023 Atsushi Tatsuma
1
+ Copyright (c) 2022-2024 Atsushi Tatsuma
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
@@ -109,7 +109,7 @@ module Rumale
109
109
 
110
110
  @classes = Numo::Int32[*y.to_a.uniq.sort]
111
111
 
112
- send("fit_#{@loss_func.name}", x, y)
112
+ send(:"fit_#{@loss_func.name}", x, y)
113
113
 
114
114
  self
115
115
  end
@@ -157,7 +157,7 @@ module Rumale
157
157
  def predict(x)
158
158
  x = ::Rumale::Validation.check_convert_sample_array(x)
159
159
 
160
- send("predict_#{@loss_func.name}", x)
160
+ send(:"predict_#{@loss_func.name}", x)
161
161
  end
162
162
 
163
163
  # Predict probability for samples.
@@ -167,7 +167,7 @@ module Rumale
167
167
  def predict_proba(x)
168
168
  x = ::Rumale::Validation.check_convert_sample_array(x)
169
169
 
170
- send("predict_proba_#{@loss_func.name}", x)
170
+ send(:"predict_proba_#{@loss_func.name}", x)
171
171
  end
172
172
 
173
173
  private
@@ -167,7 +167,8 @@ module Rumale
167
167
  if indices.count.positive?
168
168
  sx = x[indices, true]
169
169
  sy = y[indices]
170
- grad += 2.fdiv(n_samples) * sx.transpose.dot((sx.dot(w) - sy))
170
+ sz = z[indices]
171
+ grad += 2.fdiv(n_samples) * (sz - sy).dot(sx)
171
172
  end
172
173
  [loss, grad]
173
174
  end
@@ -5,6 +5,6 @@ module Rumale
5
5
  # This module consists of the classes that implement generalized linear models.
6
6
  module LinearModel
7
7
  # @!visibility private
8
- VERSION = '0.28.0'
8
+ VERSION = '0.29.0'
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rumale-linear_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.0
4
+ version: 0.29.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yoshoku
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-12 00:00:00.000000000 Z
11
+ date: 2024-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lbfgsb
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.28.0
47
+ version: 0.29.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.28.0
54
+ version: 0.29.0
55
55
  description: |
56
56
  Rumale::LinearModel provides linear model algorithms,
57
57
  such as Logistic Regression, Support Vector Machine, Lasso, and Ridge Regression
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  requirements: []
105
- rubygems_version: 3.4.20
105
+ rubygems_version: 3.5.7
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: Rumale::LinearModel provides linear model algorithms with Rumale interface.