eenie_meenie 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +9 -9
- data/lib/eenie_meenie/poly_assignment.rb +2 -0
- data/lib/eenie_meenie/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
EenieMeenie
|
2
2
|
========
|
3
3
|
|
4
|
-
This tool was written in order to play with some simple methods for assigning members of a population to one of two groups. The goal
|
4
|
+
This tool was written in order to play with some simple methods for assigning members of a population to one of two groups. The goal was initially to provide an algorithm that would limit the user's ability to predict to which group a member will be assigned.
|
5
5
|
|
6
6
|
Installation
|
7
7
|
------------
|
@@ -30,13 +30,13 @@ Example Configurations
|
|
30
30
|
# Experimental A: %50 (randomly assign)
|
31
31
|
# Experimental B: %50 (randomly assign)
|
32
32
|
|
33
|
-
EenieMeenie::
|
33
|
+
EenieMeenie::PolyAssignment.new({
|
34
34
|
groups: ["Experimental A", "Experimental B"], # EenieMeenie's assignment options
|
35
35
|
member: @obj, # Member of population
|
36
36
|
group_rules: {
|
37
|
-
"Control"
|
38
|
-
"
|
39
|
-
"
|
37
|
+
"Control" => { threshold: false }, # Don't care
|
38
|
+
"Experimental A" => { threshold: 0.5 }, # No more than 50%
|
39
|
+
"Experimental B" => { threshold: 0.5 } # No more than 50%
|
40
40
|
},
|
41
41
|
class_rules: { organization_id: 1} # Only consider members belonging to Organization 1
|
42
42
|
}).execute!
|
@@ -47,13 +47,13 @@ EenieMeenie::Assignment.new({
|
|
47
47
|
# Experimental A: %33.3 (randomly assign)
|
48
48
|
# Experimental B: %33.3 (randomly assign)
|
49
49
|
|
50
|
-
EenieMeenie::
|
50
|
+
EenieMeenie::PolyAssignment.new({
|
51
51
|
groups: ["Control", "Experimental A", "Experimental B"], # EenieMeenie's assignment options
|
52
52
|
member: @obj, # Member of population
|
53
53
|
group_rules: {
|
54
54
|
"Control" => { threshold: (1.0 / 3.0) }, # No more than one-third
|
55
|
-
"
|
56
|
-
"
|
55
|
+
"Experimental A" => { threshold: (1.0 / 3.0) }, # No more than one-third
|
56
|
+
"Experimental B" => { threshold: (1.0 / 3.0) } # No more than one-third
|
57
57
|
},
|
58
58
|
class_rules: { organization_id: 1} # Only consider members belonging to Organization 1
|
59
59
|
}).execute!
|
@@ -69,7 +69,7 @@ EenieMeenie::Assignment.new({
|
|
69
69
|
# Later someone will choose whether they're in "Experimental A" ...
|
70
70
|
# or in "Experimental B"
|
71
71
|
|
72
|
-
EenieMeenie::
|
72
|
+
EenieMeenie::PolyAssignment.new({
|
73
73
|
groups: ["Control", "Experimental"], # EenieMeenie's assignment options
|
74
74
|
member: @obj, # Member of population
|
75
75
|
group_rules: {
|
data/lib/eenie_meenie/version.rb
CHANGED