Spaces:
Sleeping
Sleeping
Arm-B-first ordering: prioritise primary endpoint for all readers
Browse files
app.py
CHANGED
|
@@ -247,10 +247,16 @@ def migrate_responses(old, new):
|
|
| 247 |
|
| 248 |
# ----------------------------------------------------------------------------- ordering
|
| 249 |
def reader_order(annotator):
|
| 250 |
-
|
|
|
|
|
|
|
|
|
|
| 251 |
seed = int(hashlib.sha256(annotator.encode()).hexdigest(), 16) % (2**32)
|
| 252 |
-
|
| 253 |
-
|
|
|
|
|
|
|
|
|
|
| 254 |
|
| 255 |
|
| 256 |
def first_unfinished_idx(order, records):
|
|
|
|
| 247 |
|
| 248 |
# ----------------------------------------------------------------------------- ordering
|
| 249 |
def reader_order(annotator):
|
| 250 |
+
# Arm B (discovered-category coherence) is the paper's primary endpoint and time is short, so we present
|
| 251 |
+
# every reader's remaining Arm B cases first, then Arm A. Each arm is still shuffled by the reader's own
|
| 252 |
+
# seed (internal blinding of the hidden pos/neg controls is preserved), and completed cases are skipped by
|
| 253 |
+
# first_unfinished_idx, so a reader resumes into her next unfinished Arm B case and keeps all prior work.
|
| 254 |
seed = int(hashlib.sha256(annotator.encode()).hexdigest(), 16) % (2**32)
|
| 255 |
+
b_ids = [c["case_id"] for c in CASES if c.get("arm", "A") == "B"]
|
| 256 |
+
a_ids = [c["case_id"] for c in CASES if c.get("arm", "A") != "B"]
|
| 257 |
+
random.Random(seed).shuffle(b_ids)
|
| 258 |
+
random.Random(seed + 1).shuffle(a_ids)
|
| 259 |
+
return b_ids + a_ids
|
| 260 |
|
| 261 |
|
| 262 |
def first_unfinished_idx(order, records):
|