kmeans-clusterer 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kmeans-clusterer.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 280cf2639965cde59fcff41909375d284637825d
|
4
|
+
data.tar.gz: e9d9fc0db3828b9bfc37def487200cad77a4d5a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cd63b7d8f844ea17972ce535d4f0b1ea29d61524351431ada328fdbf30736006739ced8f9c1b344f834c0c993f6491ef203f22761f30ef224795a6d38ee4996
|
7
|
+
data.tar.gz: 63ed5fa36fe27785c124877ac9a56d30190f55aec1a08c6ab161f79a24980f91f553c552f7956fed7d3f9bc25b4d1cbcb98df97d06e51a56c17eb5d290381019
|
data/lib/kmeans-clusterer.rb
CHANGED
@@ -77,7 +77,9 @@ class KMeansClusterer
|
|
77
77
|
opts[:k] = k
|
78
78
|
opts[:typecode] = TYPECODE[opts[:float_precision]]
|
79
79
|
|
80
|
-
data
|
80
|
+
unless data.is_a?(NMatrix)
|
81
|
+
data = NMatrix.cast data, opts[:typecode]
|
82
|
+
end
|
81
83
|
|
82
84
|
if opts[:scale_data]
|
83
85
|
data, mean, std = Scaler.scale(data, nil, nil, opts[:typecode])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kmeans-clusterer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geoff Buesing
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: narray
|