rumale-core 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: 248c014033e2e267f180ca3e81cfd71569745cfd963c614afca2fc86fb215ee4
4
- data.tar.gz: 2eb663cd4be6e8d06e3162a39b44eadedad8847d0fb7ee928da9918df35c9570
3
+ metadata.gz: a546d1eb44d3bce93d638364d26520ed562923c360320ec083dee02d558bc6f9
4
+ data.tar.gz: a5cf7078a0f360d97299296b98c11f265f8eb5cc4e5cac14272861ef4e279a36
5
5
  SHA512:
6
- metadata.gz: 4bef554a5a7c4dc4ffd36991a5740c5bd0f89d52d5f5f8b4a064c57e86f991edbf22d1574a51e2c508c4f760c055beb49c58c6d58dbe823e9ae36e4c1abcdc29
7
- data.tar.gz: 96dd2bb29d3ef7f68d6a97cf97ad2f2ddba14ae84c3792bd5b842af2cbf6f2718232db1638f59bf736b35f5fe6612195afe903aa278be5ff4794108c5a599669
6
+ metadata.gz: d36f88909c064e0a49806978034180e35043b26d71a1cff9c26c2d15115d92a923cbfd93434e083c6158199b3bbdc69fbbe8f68be9d082d1e234b50e0e7d861e
7
+ data.tar.gz: bdedaf951944923ed28f1a4e8102c2d332c9352c21755aa40e5d7c040dfc0a96568f6533e616db875ae2a25dd72c548e5939640886e40f34356c436634519191
@@ -5,6 +5,6 @@ module Rumale
5
5
  # @!visibility private
6
6
  module Core
7
7
  # @!visibility private
8
- VERSION = '0.28.0'
8
+ VERSION = '0.28.1'
9
9
  end
10
10
  end
@@ -13,7 +13,6 @@ module Rumale
13
13
  # @param y [Numo::DFloat] (shape: [n_samples_y, n_features])
14
14
  # @return [Numo::DFloat] (shape: [n_samples_x, n_samples_x] or [n_samples_x, n_samples_y] if y is given)
15
15
  def euclidean_distance(x, y = nil)
16
- y = x if y.nil?
17
16
  Numo::NMath.sqrt(squared_error(x, y).abs)
18
17
  end
19
18
 
@@ -39,9 +38,9 @@ module Rumale
39
38
  # @param y [Numo::DFloat] (shape: [n_samples_y, n_features])
40
39
  # @return [Numo::DFloat] (shape: [n_samples_x, n_samples_x] or [n_samples_x, n_samples_y] if y is given)
41
40
  def squared_error(x, y = nil)
42
- y = x if y.nil?
43
41
  sum_x_vec = (x**2).sum(axis: 1).expand_dims(1)
44
42
  sum_y_vec = y.nil? ? sum_x_vec.transpose : (y**2).sum(axis: 1).expand_dims(1).transpose
43
+ y = x if y.nil?
45
44
  err_mat = -2 * x.dot(y.transpose)
46
45
  err_mat += sum_x_vec
47
46
  err_mat += sum_y_vec
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rumale-core
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: numo-narray
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  requirements: []
76
- rubygems_version: 3.4.20
76
+ rubygems_version: 3.4.22
77
77
  signing_key:
78
78
  specification_version: 4
79
79
  summary: Rumale::Core provides base classes and utility functions for implementing