rumale-core 0.28.0 → 0.28.1
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 +4 -4
- data/lib/rumale/core/version.rb +1 -1
- data/lib/rumale/pairwise_metric.rb +1 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a546d1eb44d3bce93d638364d26520ed562923c360320ec083dee02d558bc6f9
|
4
|
+
data.tar.gz: a5cf7078a0f360d97299296b98c11f265f8eb5cc4e5cac14272861ef4e279a36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d36f88909c064e0a49806978034180e35043b26d71a1cff9c26c2d15115d92a923cbfd93434e083c6158199b3bbdc69fbbe8f68be9d082d1e234b50e0e7d861e
|
7
|
+
data.tar.gz: bdedaf951944923ed28f1a4e8102c2d332c9352c21755aa40e5d7c040dfc0a96568f6533e616db875ae2a25dd72c548e5939640886e40f34356c436634519191
|
data/lib/rumale/core/version.rb
CHANGED
@@ -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.
|
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
|
+
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.
|
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
|