rumale-linear_model 0.27.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: da770eaccf1809e9507caddea80332adf08759ae8af86179e418f7f787447153
4
- data.tar.gz: '08b4a248944649b0b1216207fdeca4dd578d75a4280fc22a98ecca717b37f3b9'
3
+ metadata.gz: c9002bcbf36a748cb91b7741fc09e54ef9d99406bc1f0d1e2855ea3c49d7592c
4
+ data.tar.gz: 952fd8f7668d93915f0254f1c7b1c78ec7a2b235d0bd78b41e2d4046cc0d9559
5
5
  SHA512:
6
- metadata.gz: 8f160cac5b9cd6abad11ad4f6d095629f22075fa1e27642892c955cb7682fb114eeee330a54e835e48b5f2b40a32e7841f2b909011bda1d67033a34308ad43cf
7
- data.tar.gz: 2b6d68a3f573d3d1394278f2a4ba5bf1a820be2eb1866967ec0e27e2b35be660f1b3367c765ecbd42e8aa41b53a1851b87163ffc81695a4b28eed6b483a9492f
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.27.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.27.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-08-26 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.27.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.27.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.3.26
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.