rumale-linear_model 0.28.0 → 0.28.1

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: 928168740565c9efd716841ef5a6901296182de1282706b093f287871cf80da5
4
- data.tar.gz: 5e42d83b8a8a34dc68a0e2bbca71bd5e94f5a24ada21b03d24f548ff9d0c0c21
3
+ metadata.gz: c9002bcbf36a748cb91b7741fc09e54ef9d99406bc1f0d1e2855ea3c49d7592c
4
+ data.tar.gz: 952fd8f7668d93915f0254f1c7b1c78ec7a2b235d0bd78b41e2d4046cc0d9559
5
5
  SHA512:
6
- metadata.gz: b60d55f537d29da22f76355347f11b3def138e177befd0e37fae1d513285aebe951f582cbf428ca6d562deb5ba77c932d780cb3c9b3250eb3c5dbb1591a44168
7
- data.tar.gz: 4e0661211522fe86613919331723761eaf35cc8f51d14d1b5351cd3d3975fe4a1bdc9430f36c57f92b635daa079896ea05942400cacdbfaf4af3523740c8827f
6
+ metadata.gz: f7e03b9b3e2055a8809d7759177f3ac6159cdf520cc25aeff10ee88ad6575c6d335143bbe026f8d47a50298c0c6c4bee5a9e4bbabaa5ff2467b7d1b46c5e69e0
7
+ data.tar.gz: 12094e249ae26a47f7e3c90abcab55d10f9678a3782f7c30b65b78a51f2da630cf97268af51bc13558341819d7fd432705ed1d0feb6c14afff4bb7efcdc361ac
@@ -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.28.1'
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.28.1
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: 2023-12-24 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.28.1
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.28.1
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.4.22
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: Rumale::LinearModel provides linear model algorithms with Rumale interface.