rank-aggregation 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/rank +6 -3
- data/rank-aggregation.gemspec +2 -1
- data/samples/different-sizes-interleaved +17 -0
- data/scores +1 -0
- metadata +4 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/bin/rank
CHANGED
@@ -7,15 +7,18 @@ require "rubygems"
|
|
7
7
|
require "trollop"
|
8
8
|
|
9
9
|
opts = Trollop.options do
|
10
|
-
opt :score, "Output
|
10
|
+
opt :score, "Output scoring metrics on STDERR"
|
11
11
|
opt :rough, "Use only the rough score for sorting"
|
12
|
+
opt :smoothing, "Set the smoothing parameter: It should be approximately equal to the sample size you consider large enough to matter", :type => :int
|
12
13
|
end
|
13
14
|
|
14
15
|
ranker = RankAggregation::Ranker.new
|
15
16
|
|
17
|
+
ranker.smoothing = opts[:smoothing] if opts[:smoothing]
|
18
|
+
|
16
19
|
collect = [] if opts[:score]
|
17
20
|
|
18
|
-
|
21
|
+
ARGF.each_line{|l|
|
19
22
|
items = l.split("\t").map{|x| x.strip}.select{|x| x.length > 0}
|
20
23
|
|
21
24
|
collect << items if collect
|
@@ -30,5 +33,5 @@ puts result.join("\t")
|
|
30
33
|
if opts[:score]
|
31
34
|
require "rank-aggregation/scorer"
|
32
35
|
|
33
|
-
puts RankAggregation::Scorer.average_kendall_distance result, collect
|
36
|
+
STDERR.puts "Average kendal distance: #{RankAggregation::Scorer.average_kendall_distance result, collect}"
|
34
37
|
end
|
data/rank-aggregation.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{rank-aggregation}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["David R. MacIver"]
|
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
"notes/algorithm.markdown",
|
30
30
|
"rank-aggregation.gemspec",
|
31
31
|
"samples/clear-with-noise",
|
32
|
+
"samples/different-sizes-interleaved",
|
32
33
|
"samples/languages",
|
33
34
|
"samples/pairs",
|
34
35
|
"samples/random",
|
@@ -0,0 +1,17 @@
|
|
1
|
+
2 4 6 8 10 12 14 16 18 20
|
2
|
+
2 4 6 8 10 12 14 16 18 20
|
3
|
+
2 4 6 8 10 12 14 16 18 20
|
4
|
+
2 4 6 8 10 12 14 16 18 20
|
5
|
+
2 4 6 8 10 12 14 16 18 20
|
6
|
+
2 4 6 8 10 12 14 16 18 20
|
7
|
+
2 4 6 8 10 12 14 16 18 20
|
8
|
+
2 4 6 8 10 12 14 16 18 20
|
9
|
+
2 4 6 8 10 12 14 16 18 20
|
10
|
+
2 4 6 8 10 12 14 16 18 20
|
11
|
+
19 17 15 13 11 9 7 5 3 1
|
12
|
+
19 17 15 13 11 9 7 5 3 1
|
13
|
+
19 17 15 13 11 9 7 5 3 1
|
14
|
+
19 17 15 13 11 9 7 5 3 1
|
15
|
+
19 17 15 13 11 9 7 5 3 1
|
16
|
+
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
17
|
+
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
data/scores
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rank-aggregation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David R. MacIver
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- notes/algorithm.markdown
|
54
54
|
- rank-aggregation.gemspec
|
55
55
|
- samples/clear-with-noise
|
56
|
+
- samples/different-sizes-interleaved
|
56
57
|
- samples/languages
|
57
58
|
- samples/pairs
|
58
59
|
- samples/random
|