jubatus 0.9.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
1.0.0
|
@@ -31,14 +31,11 @@ class ClusteringTest < Test::Unit::TestCase
|
|
31
31
|
},
|
32
32
|
"parameter" => {
|
33
33
|
"k" => 10,
|
34
|
-
"
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
"
|
39
|
-
"forgetting_factor" => 0,
|
40
|
-
"forgetting_threshold" => 0.5,
|
41
|
-
"seed" => 0,
|
34
|
+
"seed" => 0
|
35
|
+
},
|
36
|
+
"compressor_method" => "simple",
|
37
|
+
"compressor_parameter" => {
|
38
|
+
"bucket_size" => 3
|
42
39
|
}
|
43
40
|
}
|
44
41
|
|
@@ -75,7 +72,7 @@ class ClusteringTest < Test::Unit::TestCase
|
|
75
72
|
end
|
76
73
|
|
77
74
|
def test_push
|
78
|
-
d = Jubatus::Common::Datum.new
|
75
|
+
d = Jubatus::Clustering::IndexedPoint.new("test", Jubatus::Common::Datum.new)
|
79
76
|
res = @cli.push([d])
|
80
77
|
end
|
81
78
|
|
@@ -87,17 +84,27 @@ class ClusteringTest < Test::Unit::TestCase
|
|
87
84
|
def test_get_core_members
|
88
85
|
for i in 0..99
|
89
86
|
d = Jubatus::Common::Datum.new({"nkey1" => i, "nkey2" => -i})
|
90
|
-
@cli.push([d])
|
87
|
+
@cli.push([Jubatus::Clustering::IndexedPoint.new(i.to_s, d)])
|
91
88
|
end
|
92
89
|
res = @cli.get_core_members()
|
93
90
|
assert_equal(10, res.length)
|
94
91
|
assert_instance_of(Jubatus::Clustering::WeightedDatum, res[0][0])
|
95
92
|
end
|
96
93
|
|
94
|
+
def test_get_core_members_light
|
95
|
+
for i in 0..99
|
96
|
+
d = Jubatus::Common::Datum.new({"nkey1" => i, "nkey2" => -i})
|
97
|
+
@cli.push([Jubatus::Clustering::IndexedPoint.new(i.to_s, d)])
|
98
|
+
end
|
99
|
+
res = @cli.get_core_members_light()
|
100
|
+
assert_equal(10, res.length)
|
101
|
+
assert_instance_of(Jubatus::Clustering::WeightedIndex, res[0][0])
|
102
|
+
end
|
103
|
+
|
97
104
|
def test_k_center
|
98
105
|
for i in 0..99
|
99
106
|
d = Jubatus::Common::Datum.new({"nkey1" => i, "nkey2" => -i})
|
100
|
-
@cli.push([d])
|
107
|
+
@cli.push([Jubatus::Clustering::IndexedPoint.new(i.to_s, d)])
|
101
108
|
end
|
102
109
|
res = @cli.get_k_center()
|
103
110
|
assert_equal(10, res.length)
|
@@ -107,7 +114,7 @@ class ClusteringTest < Test::Unit::TestCase
|
|
107
114
|
def test_nearest_center
|
108
115
|
for i in 0..99
|
109
116
|
d = Jubatus::Common::Datum.new({"nkey1" => i, "nkey2" => -i})
|
110
|
-
@cli.push([d])
|
117
|
+
@cli.push([Jubatus::Clustering::IndexedPoint.new(i.to_s, d)])
|
111
118
|
end
|
112
119
|
q = Jubatus::Common::Datum.new({"nkey1" => 2.0, "nkey2" => 1.0})
|
113
120
|
res = @cli.get_nearest_center(q)
|
@@ -117,11 +124,21 @@ class ClusteringTest < Test::Unit::TestCase
|
|
117
124
|
def test_nearest_members
|
118
125
|
for i in 0..99
|
119
126
|
d = Jubatus::Common::Datum.new({"nkey1" => i, "nkey2" => -i})
|
120
|
-
@cli.push([d])
|
127
|
+
@cli.push([Jubatus::Clustering::IndexedPoint.new(i.to_s, d)])
|
121
128
|
end
|
122
129
|
q = Jubatus::Common::Datum.new({"nkey1" => 2.0, "nkey2" => 1.0})
|
123
130
|
res = @cli.get_nearest_members(q)
|
124
131
|
assert_instance_of(Jubatus::Clustering::WeightedDatum, res[0])
|
125
132
|
end
|
126
133
|
|
134
|
+
def test_nearest_members
|
135
|
+
for i in 0..99
|
136
|
+
d = Jubatus::Common::Datum.new({"nkey1" => i, "nkey2" => -i})
|
137
|
+
@cli.push([Jubatus::Clustering::IndexedPoint.new(i.to_s, d)])
|
138
|
+
end
|
139
|
+
q = Jubatus::Common::Datum.new({"nkey1" => 2.0, "nkey2" => 1.0})
|
140
|
+
res = @cli.get_nearest_members_light(q)
|
141
|
+
assert_instance_of(Jubatus::Clustering::WeightedIndex, res[0])
|
142
|
+
end
|
143
|
+
|
127
144
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jubatus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-10-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: msgpack-rpc
|