umappp 0.1.3 → 0.1.4
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/umappp/version.rb +1 -1
- data/lib/umappp.rb +8 -6
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fde6f3e2f4fc7014e87ddd4cdcb5fefe60d14e34364682a667436373293ec86e
|
|
4
|
+
data.tar.gz: aecbfebfbaa5181eeb6572cb27e8cd5621d52bb2b7912ffbdc786eada4e8d8c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 21a24bf715c70961237d428679e7e2bd2b090843275ec989251645ef7b2cb579f6a130ae5a46cfedbcf34d25b72f6db9a41032dc0d7df39c62e93d39c5e36e2a
|
|
7
|
+
data.tar.gz: 5006adc1daa306597e2bfe961a6cbdc9bcf6a291d24bad200766551c8cf2f15b4096e544758da1040c0d0e46c7b6840cca58c1df3facc372000588e3c9a6da4c
|
data/lib/umappp/version.rb
CHANGED
data/lib/umappp.rb
CHANGED
|
@@ -6,7 +6,6 @@ require_relative "umappp/umappp"
|
|
|
6
6
|
|
|
7
7
|
# Uniform Manifold Approximation and Projection
|
|
8
8
|
module Umappp
|
|
9
|
-
|
|
10
9
|
# Make wrapper methods for the C++ function generated by Rice private
|
|
11
10
|
private_class_method :umappp_run
|
|
12
11
|
private_class_method :umappp_default_parameters
|
|
@@ -17,9 +16,9 @@ module Umappp
|
|
|
17
16
|
umappp_default_parameters
|
|
18
17
|
end
|
|
19
18
|
|
|
20
|
-
# Runs the Uniform Manifold Approximation and Projection (UMAP) dimensional
|
|
21
|
-
# reduction technique.
|
|
22
|
-
# @param embedding [Array, Numo::SFloat]
|
|
19
|
+
# Runs the Uniform Manifold Approximation and Projection (UMAP) dimensional
|
|
20
|
+
# reduction technique.
|
|
21
|
+
# @param embedding [Array, Numo::SFloat]
|
|
23
22
|
# @param method [Symbol]
|
|
24
23
|
# @param ndim [Integer]
|
|
25
24
|
# @param tick [Integer]
|
|
@@ -45,8 +44,11 @@ module Umappp
|
|
|
45
44
|
end
|
|
46
45
|
|
|
47
46
|
nnmethod = %i[annoy vptree].index(method.to_sym)
|
|
48
|
-
|
|
47
|
+
raise ArgumentError, "method must be :annoy or :vptree" if nnmethod.nil?
|
|
48
|
+
|
|
49
|
+
embedding2 = Numo::SFloat.cast(embedding)
|
|
50
|
+
raise ArgumentError, "embedding must be a 2D array" if embedding2.ndim <= 1
|
|
49
51
|
|
|
50
|
-
umappp_run(params,
|
|
52
|
+
umappp_run(params, embedding2, ndim, nnmethod, tick)
|
|
51
53
|
end
|
|
52
54
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: umappp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- kojix2
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-10-
|
|
11
|
+
date: 2022-10-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: numo-narray
|