boardman7 commited on
Commit
6b8daa5
·
verified ·
1 Parent(s): 82df9b5

Complete BUV observed September coding and preserve fourteen frozen exploratory fits

Browse files
supplements/20261028_buv_full_observed_regression/aggregate_buv_observed_comments.py ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Close the observed September coding census and rebuild fixed measurements.
2
+
3
+ Real computation is restricted to the dedicated AutoDL. This program reads no
4
+ outcomes, fits no semantic model and does not claim complete historical capture.
5
+ The B1035 prior and video text judgments remain frozen; thirteen families are
6
+ formed from per-record vote unions, not sums of normalized fine shares.
7
+ """
8
+ from __future__ import annotations
9
+
10
+ import argparse
11
+ from collections import Counter
12
+ from datetime import datetime, timezone
13
+ import json
14
+ from pathlib import Path
15
+ import time
16
+
17
+ from aggregate_buv_context_direct import ht_day, validate_judgment, votes
18
+ from build_buv_quick_text_trial import (digest, distribution, read_rows,
19
+ require_cloud, save, save_rows)
20
+ from compare_buv_coarse_measurement import (collapse_judgments, coarse_prior,
21
+ mapping_from_plan)
22
+
23
+
24
+ def verify_folder(folder, manifest_name, expected):
25
+ path = folder / manifest_name
26
+ if digest(path) != expected:
27
+ raise ValueError('Frozen manifest mismatch: ' + str(path))
28
+ for name, entry in json.loads(path.read_text())['files'].items():
29
+ sha = entry['sha256'] if isinstance(entry, dict) else entry
30
+ if digest(folder / name) != sha:
31
+ raise ValueError('Frozen file mismatch: ' + str(folder / name))
32
+
33
+
34
+ def close_census(queue, judgments, coordinates):
35
+ sources = {r['coding_id']: r for r in queue}
36
+ labels = {r['input_id']: r for r in judgments}
37
+ if len(sources) != len(queue) or len(labels) != len(judgments):
38
+ raise ValueError('Duplicate coding identity')
39
+ if len({(r['video_id'], r['record_id']) for r in queue}) != len(queue):
40
+ raise ValueError('Duplicate native identity')
41
+ if set(sources) != set(labels):
42
+ raise ValueError('Incomplete or extraneous coding census')
43
+ for rid, row in sources.items():
44
+ if (row['source_frame'] != 'S' or row['is_source_author'] is True
45
+ or not row['created_at_beijing'].startswith('2026-09-')
46
+ or row['inclusion_probability'] != 1
47
+ or row['sample_n'] != row['population_N']
48
+ or row['role'] != ('non_author' if row['is_source_author'] is False else 'unknown')):
49
+ raise ValueError('Observed census scope changed')
50
+ validate_judgment(row, labels[rid], coordinates, 'comment')
51
+ return labels
52
+
53
+
54
+ def daily_measurement(queue, labels, coordinates, prior, all_vids):
55
+ result = []
56
+ for day in [f'2026-09-{d:02d}' for d in range(1, 31)]:
57
+ rows = [r for r in queue if r['created_at_beijing'][:10] == day]
58
+ for role in ('broad', 'strict_non_author'):
59
+ for leave in ['ALL_S'] + all_vids:
60
+ d = ht_day(rows, labels, rows, coordinates, role, leave)
61
+ if any(v != 0 for v in d['sampling_variance_C_K']):
62
+ raise ValueError('Observed census cannot retain subsampling variance')
63
+ result.append(dict(d, date=day, role_view=role, leave_out_video=leave,
64
+ p_K=distribution(d['C_K']), D_K=distribution(d['C_K'], prior),
65
+ weighted_leaf_votes=sum(d['C_K']), observed_census=True,
66
+ source_video_count_is_observed_in_sample=False,
67
+ mapping_coverage_is_HT_ratio_to_observed_denominator=False,
68
+ mapping_coverage_is_observed_weighted_ratio=True,
69
+ zero_sampling_variance_is_not_zero_measurement_or_capture_error=True))
70
+ return result
71
+
72
+
73
+ def main():
74
+ parser = argparse.ArgumentParser(description=__doc__)
75
+ for name in ('plan', 'root', 'old-measurement', 'old-prepare', 'group-plan', 'out'):
76
+ parser.add_argument('--' + name, type=Path, required=True)
77
+ args = parser.parse_args()
78
+ require_cloud()
79
+ began = time.monotonic()
80
+ plan = json.loads(args.plan.read_text())
81
+ if plan['versions'] != ['coarse13', 'fine35'] or plan['total_max_fits'] != 14:
82
+ raise ValueError('Unregistered experiment family')
83
+ queue_dir = args.root / 'queue_v2'
84
+ verify_folder(queue_dir, 'manifest.json', plan['queue_manifest_sha256'])
85
+ verify_folder(args.old_measurement, 'measurement_manifest.json', plan['old_measurement_manifest_sha256'])
86
+ verify_folder(args.old_prepare, 'manifest.json', plan['old_prepare_manifest_sha256'])
87
+ if digest(args.group_plan) != plan['group_plan_sha256']:
88
+ raise ValueError('Coarse decision changed')
89
+ if digest(args.root / 'input/protocol.json') != plan['protocol_sha256']:
90
+ raise ValueError('Attribute protocol changed')
91
+ if digest(__file__) != plan['aggregation_script_sha256']:
92
+ raise ValueError('Aggregation code changed after plan freeze')
93
+ fine = json.loads((args.old_measurement / 'coordinates.json').read_text())['K']
94
+ mapping, families = mapping_from_plan(json.loads(args.group_plan.read_text()), fine)
95
+ queue = read_rows(queue_dir / 'september_queue.jsonl')
96
+ reused = read_rows(queue_dir / 'september_reused_coding.jsonl')
97
+ fresh = []; receipts = []; packet_hashes = []
98
+ for entry in plan['coding_packets']:
99
+ folder = args.root / entry['folder']
100
+ if digest(folder / 'receipt.json') != entry['receipt_sha256']:
101
+ raise ValueError('Coding receipt changed')
102
+ receipt = json.loads((folder / 'receipt.json').read_text())
103
+ rows = read_rows(folder / 'coding.jsonl')
104
+ if (receipt['status'] != 'DIRECT_JUDGMENTS_STRUCTURALLY_VALIDATED'
105
+ or receipt['coding_sha256'] != digest(folder / 'coding.jsonl')
106
+ or receipt['protocol_sha256'] != plan['protocol_sha256']
107
+ or receipt['records'] != len(rows)):
108
+ raise ValueError('Coding receipt mismatch')
109
+ packet_hashes.append(receipt['packet_sha256'])
110
+ receipts.append(dict(entry, **receipt)); fresh.extend(rows)
111
+ expected_packets = [digest(p) for p in sorted((queue_dir / 'september_pending').glob('*.jsonl'))]
112
+ if sorted(packet_hashes) != sorted(expected_packets) or len(packet_hashes) != 43:
113
+ raise ValueError('Pending packet set differs from completed coding')
114
+ comments = reused + fresh
115
+ bycomment = close_census(queue, comments, fine)
116
+ roles = dict(Counter(r['role'] for r in queue))
117
+ if (len(queue), len(reused), len(fresh), roles) != (12510, 1771, 10739,
118
+ {'unknown': 11369, 'non_author': 1141}):
119
+ raise ValueError('Frozen observed scope counts changed')
120
+ bg = json.loads((args.old_measurement / 'background_context_prior.json').read_text())
121
+ if len(bg['record_votes']) != 1035 or bg['coordinates'] != fine:
122
+ raise ValueError('Original background prior changed')
123
+ units = read_rows(args.old_prepare / 'video_units.jsonl')
124
+ video = read_rows(args.old_measurement / 'video_coding.jsonl')
125
+ byvideo = {r['input_id']: r for r in video}
126
+ if len(video) != len(byvideo) or set(byvideo) != {r['unit_id'] for r in units}:
127
+ raise ValueError('Video text judgment set mismatch')
128
+ for unit in units:
129
+ validate_judgment(unit, byvideo[unit['unit_id']], fine, 'video')
130
+ old_supply = read_rows(args.old_measurement / 'video_supply.jsonl')
131
+ all_vids = [r['video_id'] for r in old_supply]
132
+ if len(all_vids) != 30 or len(set(all_vids)) != 30:
133
+ raise ValueError('Original video scope changed')
134
+ args.out.mkdir(parents=True, exist_ok=False)
135
+ closure = dict(status='ALL_ELIGIBLE_OBSERVED_SEPTEMBER_RECORDS_CODED',
136
+ comments=len(queue), exact_reused=len(reused), direct_new=len(fresh), roles=roles,
137
+ known_authors_excluded=136, fixed_S_records=12646, completed_packets=len(receipts),
138
+ exact_identity_coverage=True, no_missing_or_duplicate_coding_ids=True,
139
+ historical_capture_completeness_proven=False, semantic_accuracy_proven=False,
140
+ new_collection=False, new_pro_review=False, human_gold=False,
141
+ old_partial_batch_completion_flags_are_not_global_census_status=True,
142
+ plan_sha256=digest(args.plan), receipts=receipts)
143
+ save(args.out / 'coding_closure.json', closure)
144
+ versions = {}
145
+ for version in plan['versions']:
146
+ out = args.out / version; out.mkdir()
147
+ if version == 'fine35':
148
+ coords, prior, judgments, vjudgments, supply = fine, bg, comments, video, old_supply
149
+ else:
150
+ coords = families; prior = coarse_prior(bg, mapping, families)
151
+ judgments = collapse_judgments(comments, mapping)
152
+ vjudgments = collapse_judgments(video, mapping)
153
+ vindex = {r['input_id']: r for r in vjudgments}
154
+ supply = []
155
+ for old in old_supply:
156
+ records = [r for r in units if r['video_id'] == old['video_id']]
157
+ labels = [votes(vindex[r['unit_id']], coords) for r in records]
158
+ counts = [sum(k in label for label in labels) for k in coords]
159
+ supply.append(dict(old, q_K=counts, S_K=distribution(counts)))
160
+ labels = {r['input_id']: r for r in judgments}
161
+ daily = daily_measurement(queue, labels, coords, prior['pi_K'], all_vids)
162
+ if len(daily) != 1860:
163
+ raise ValueError('Daily role/leave-out scope changed')
164
+ save(out / 'background_context_prior.json', prior)
165
+ save_rows(out / 'comment_coding.jsonl', judgments)
166
+ save_rows(out / 'video_coding.jsonl', vjudgments)
167
+ save_rows(out / 'video_supply.jsonl', supply)
168
+ save_rows(out / 'daily_attention.jsonl', daily)
169
+ save(out / 'coordinates.json', dict(all=coords, K=coords, pi_K=prior['pi_K'],
170
+ nontrainable=[], classifier_used=False, version=version))
171
+ summary = dict(status='QUICK_TEXT_MEASUREMENTS_COMPLETED_EXPLORATORY',
172
+ status_means_completed_computation_not_semantic_validation=True,
173
+ version=version, outcomes_read=False, comments_coded=len(queue),
174
+ comments_with_votes=sum(bool(votes(r, coords)) for r in judgments),
175
+ comments_with_residual_unknown=sum(bool(r.get('residual_unknown')) for r in judgments),
176
+ comments_unmeasurable=sum(r['status']=='unmeasurable' for r in judgments),
177
+ comment_roles=roles, original_B_records=1035, expanded_B_used=False,
178
+ video_units_coded=len(units), video_supply_states=dict(Counter(r['status'] for r in supply)),
179
+ daily_rows=len(daily),
180
+ broad_valid_days=sum(r['role_view']=='broad' and r['leave_out_video']=='ALL_S' and r['D_K'] is not None for r in daily),
181
+ strict_valid_days=sum(r['role_view']=='strict_non_author' and r['leave_out_video']=='ALL_S' and r['D_K'] is not None for r in daily),
182
+ observed_census=True, census_is_of_delivered_fixed_S_not_all_historical_comments=True,
183
+ new_direct_judgments_single_executor=True, new_pro_review=False, human_gold=False,
184
+ semantic_accuracy_proven=False, search_used=False, new_collection=False,
185
+ runtime='autodl-pro-793045af03ef', finished_at_utc=datetime.now(timezone.utc).isoformat())
186
+ save(out / 'summary.json', summary)
187
+ save(out / 'measurement_manifest.json', dict(
188
+ files={p.name:digest(p) for p in sorted(out.iterdir()) if p.is_file()},
189
+ script_sha256=digest(__file__), plan_sha256=digest(args.plan), outcomes_read=False,
190
+ closure_sha256=digest(args.out / 'coding_closure.json'),
191
+ analyst_has_seen_earlier_outcomes=True,
192
+ frozen_at_before_new_regression_outcome_read=datetime.now(timezone.utc).isoformat()))
193
+ versions[version] = summary
194
+ save(args.out / 'summary.json', dict(status='FULL_OBSERVED_MEASUREMENTS_COMPLETED',
195
+ versions=versions, elapsed_seconds=time.monotonic()-began))
196
+ save(args.out / 'manifest.json', dict(files={str(p.relative_to(args.out)):digest(p)
197
+ for p in sorted(args.out.rglob('*')) if p.is_file()}))
198
+ print(json.dumps({k:v for k,v in closure.items() if k!='receipts'}), flush=True)
199
+
200
+
201
+ if __name__ == '__main__':
202
+ main()
supplements/20261028_buv_full_observed_regression/buv_audit_full_result_scope.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pathlib import Path
2
+ import json,hashlib
3
+ from collections import Counter
4
+ root=Path('/root/autodl-tmp/buv_semantic_20261027/observed_corpus_20261028')
5
+ import sys;sys.path.insert(0,str(root/'code'))
6
+ from build_buv_quick_text_trial import require_cloud,read_rows
7
+ require_cloud()
8
+ result={}
9
+ for version in ['coarse13','fine35']:
10
+ rroot=root/'regression_full_v1'/version
11
+ main=read_rows(rroot/'main/joined_panel.jsonl');strict=read_rows(rroot/'strict_non_author/joined_panel.jsonl')
12
+ strictkeys={(r['video_id'],r['date']) for r in strict}
13
+ missing=[{k:r[k] for k in ['video_id','sample_id','date','lag_date']} for r in main if (r['video_id'],r['date']) not in strictkeys]
14
+ excluded=read_rows(rroot/'strict_non_author/excluded_calendar_rows.jsonl')
15
+ for r in missing:
16
+ r['reasons']=next(x['reasons'] for x in excluded if x['video_id']==r['video_id'] and x['date']==r['date'])
17
+ days=read_rows(rroot/'main/daily_comparison.jsonl')
18
+ result[version]={'strict_extra_exclusions':missing,'main_test_days_matching_beats_baseline':sum(r['match_minus_baseline']<0 for r in days),'main_test_days_matching_beats_fixed_shift':sum(r['match_minus_shift']<0 for r in days),'test_days':len(days),'main_rows':len(main),'strict_rows':len(strict),'scenarios':{}}
19
+ for scenario in ['main','unweighted','strict_non_author']:
20
+ path=rroot/scenario
21
+ models=[json.loads(f.read_text()) for f in path.glob('*_model.json')]
22
+ result[version]['scenarios'][scenario]={'all_models_converged':all(m['converged'] for m in models),'model_count':len(models),'messages':[m.get('message') for m in models],'summary':json.loads((path/'summary.json').read_text())}
23
+ result['no_refitting']=True
24
+ (root/'regression_scope_audit.json').write_text(json.dumps(result,ensure_ascii=False,indent=2)+'\n')
25
+ print(json.dumps({v:{k:z for k,z in r.items() if k!='scenarios'} for v,r in result.items() if isinstance(r,dict)},ensure_ascii=False))
26
+ print(hashlib.sha256((root/'regression_scope_audit.json').read_bytes()).hexdigest())
supplements/20261028_buv_full_observed_regression/buv_observed_regression_plan.json ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "schema": "buv-full-observed-regression-plan-v1",
3
+ "created_at_utc": "2026-10-28T06:48:01.714837+00:00",
4
+ "versions": [
5
+ "coarse13",
6
+ "fine35"
7
+ ],
8
+ "primary": "coarse13",
9
+ "sensitivity": "fine35",
10
+ "total_max_fits": 14,
11
+ "per_version_max_fits": 7,
12
+ "rules": "Reuse fit_buv_quick_text_trial.py unchanged; all seven pre-existing specifications per coordinate version, no tuning or selection by result.",
13
+ "queue_manifest_sha256": "0433799c8ebb7a568c4fa3e1c34520fb0dba7fd31012cfbdcc7021c620d27efd",
14
+ "old_measurement_manifest_sha256": "7f6438e65ce37c7154380ba6496ad22d4edf074b091cd656643f6e40bb4552b4",
15
+ "old_prepare_manifest_sha256": "c94e55b8e1294aaee521076c9b3639cc2cfb584327c324d6a8d0707a670dde94",
16
+ "group_plan_sha256": "001672beb2643b0f493d7a70ba9213137e73facc64174cf523f0c9ec646a7019",
17
+ "protocol_sha256": "66b9aa2e2091fd9a7ed8fe0b6779e34e4b878178d6eb380f9056fdf8679c23cc",
18
+ "aggregation_script_sha256": "1587e488e9b512f4f2776fdec48f3e779397188c20713d8482fe9c18f4ca9b10",
19
+ "fit_script_sha256": "2771618ed8b2f983ffb89edd36b1c54632946c8397a8634b5d45129e877bcaf6",
20
+ "numerical_helper_sha256": "0bed6ace5a63adca066f2d5caa80e36a6aaa3c9af51e8649d0ed02c353d21fb8",
21
+ "outcome_sha256": "4181ca2570272f9c2f7314c3978196b0f33cb544965af93a448748f67f8ddee5",
22
+ "coding_packets": [
23
+ {
24
+ "folder": "coding_00001_00250",
25
+ "receipt_sha256": "4d6dd5cd792f8f68ca7204803a99bfd4a841701109b7e8a70a0c9a00b44e6320"
26
+ },
27
+ {
28
+ "folder": "coding_00251_04000/00251_00500",
29
+ "receipt_sha256": "2b98c6c68e13394fe5ce2e045ad60494e246d779d2e614f45d6f58babc60a07d"
30
+ },
31
+ {
32
+ "folder": "coding_00251_04000/00501_00750",
33
+ "receipt_sha256": "03c240f1eefcb9b84c86502ba22784e61212663e67f05726b1ab396cd8de8744"
34
+ },
35
+ {
36
+ "folder": "coding_00251_04000/00751_01000",
37
+ "receipt_sha256": "dff254a9473cdcd63aeeef7d5ebaa3e5928851210700b22c667518f888e69541"
38
+ },
39
+ {
40
+ "folder": "coding_00251_04000/01001_01250",
41
+ "receipt_sha256": "3a6f3c5774d34dece617dbf1c3c405c8869b38a183a76127c113425b5df9c8c5"
42
+ },
43
+ {
44
+ "folder": "coding_00251_04000/01251_01500",
45
+ "receipt_sha256": "8aaa89154b5f7742c88fb6c71491fb3bff6aed122e9bc5a9fb2956a5320b92e0"
46
+ },
47
+ {
48
+ "folder": "coding_00251_04000/01501_01750",
49
+ "receipt_sha256": "357892a51a022ed088cad6e0fa3a47adf956cab7a632e13574b23da548fb5c2e"
50
+ },
51
+ {
52
+ "folder": "coding_00251_04000/01751_02000",
53
+ "receipt_sha256": "784928f614c95fc5257886dd06457ddfad70c87a63fdc200db75ce40aa30aae8"
54
+ },
55
+ {
56
+ "folder": "coding_00251_04000/02001_02250",
57
+ "receipt_sha256": "159e022c488cdfc137ad054325e01f2522641650f3df5a1f00493ab1ea9c3b54"
58
+ },
59
+ {
60
+ "folder": "coding_00251_04000/02251_02500",
61
+ "receipt_sha256": "65b5049a6005959cc90e66bb063b6797063806b4e177358c3478b16e70989aa5"
62
+ },
63
+ {
64
+ "folder": "coding_00251_04000/02501_02750",
65
+ "receipt_sha256": "0f28afb3896ab444cae4f7337cbf247868bd410e9f607c1dd1079a891b9bb924"
66
+ },
67
+ {
68
+ "folder": "coding_00251_04000/02751_03000",
69
+ "receipt_sha256": "0f84f6824c3288074f605dae4702bc5b15eb0fce70677077e9d3ade3cc71d4a4"
70
+ },
71
+ {
72
+ "folder": "coding_00251_04000/03001_03250",
73
+ "receipt_sha256": "a91b7b268385cede7483d65a10d6b985c7859b1583869b3fce9b10ec5174f429"
74
+ },
75
+ {
76
+ "folder": "coding_00251_04000/03251_03500",
77
+ "receipt_sha256": "e6511be84a92324e5619513f5c5e0333b7f1addfb13440a4b4db7a3a99027798"
78
+ },
79
+ {
80
+ "folder": "coding_00251_04000/03501_03750",
81
+ "receipt_sha256": "f19d627d0aa4bff652d995e10786e811e66a869d0de8bb827404b779e151566e"
82
+ },
83
+ {
84
+ "folder": "coding_00251_04000/03751_04000",
85
+ "receipt_sha256": "88efd265845a7e581a6ad30717b86030738b5a2a48a8ea8b92649fbe5b77772f"
86
+ },
87
+ {
88
+ "folder": "coding_04001_05000/04001_04250",
89
+ "receipt_sha256": "cb54521c9dcc9f2a2acdad66c773e8b3be977e19da236d1c7048426c5f25f2a6"
90
+ },
91
+ {
92
+ "folder": "coding_04001_05000/04251_04500",
93
+ "receipt_sha256": "abab7830e7ca8c966795c01fe85f20c42c76c1b5754b2b37181f6f18ddc1842c"
94
+ },
95
+ {
96
+ "folder": "coding_04001_05000/04501_04750",
97
+ "receipt_sha256": "e436b6d5b00656f89fefd59e10f73f51a75e298d581bac9b8683f979be008891"
98
+ },
99
+ {
100
+ "folder": "coding_04001_05000/04751_05000",
101
+ "receipt_sha256": "8c03600178cc4b2782d7183dcb9f20ced59dee4c11f84e5dab65bea33dbb300d"
102
+ },
103
+ {
104
+ "folder": "coding_05001_06000/05001_05250",
105
+ "receipt_sha256": "70510f763e841833fa26748291d1bf7f95994912c9b53141a4244fcbf12b6716"
106
+ },
107
+ {
108
+ "folder": "coding_05001_06000/05251_05500",
109
+ "receipt_sha256": "a04dc7d459a20c01f28c9c33a29ea5b7548c3b3002235b939d979482beb7d181"
110
+ },
111
+ {
112
+ "folder": "coding_05001_06000/05501_05750",
113
+ "receipt_sha256": "6226fb274d587eea275e43c9e05862c162b5a4c1a46baf022e148220cbb15625"
114
+ },
115
+ {
116
+ "folder": "coding_05001_06000/05751_06000",
117
+ "receipt_sha256": "e9056e5c093e6dd155386b79a73a19913f1b3fa332942d8bfca5739f52749ad6"
118
+ },
119
+ {
120
+ "folder": "coding_06001_10739/06001_06250",
121
+ "receipt_sha256": "1684ae49af43a4245c51b2cfc1cfc1a63630953c8b1e3d3d742ed601c069bcbc"
122
+ },
123
+ {
124
+ "folder": "coding_06001_10739/06251_06500",
125
+ "receipt_sha256": "209f3d5a8dfb589e99e1ff6af05f2402e60df88f8db08c5f2a2d4dce6722f242"
126
+ },
127
+ {
128
+ "folder": "coding_06001_10739/06501_06750",
129
+ "receipt_sha256": "c4845cb95f0a6cec0c8acdb4cfc81f9a3a7ad9829b45679b63ccb02c8e60a10b"
130
+ },
131
+ {
132
+ "folder": "coding_06001_10739/06751_07000",
133
+ "receipt_sha256": "045e3d8473bf3b3eb26f696d771d6b7013e71641b0b1f43463b0690b293ca963"
134
+ },
135
+ {
136
+ "folder": "coding_06001_10739/07001_07250",
137
+ "receipt_sha256": "ecc1e9b706ae8879a5fcad7d9331d700ff67b06e7da07bd09289f9a396d330a9"
138
+ },
139
+ {
140
+ "folder": "coding_06001_10739/07251_07500",
141
+ "receipt_sha256": "d68c068f138499e53b31fdfc0d7d38abc049498648681ad9b24d5f6d330ceefa"
142
+ },
143
+ {
144
+ "folder": "coding_06001_10739/07501_07750",
145
+ "receipt_sha256": "1cf0a609de6002640ce1b50eca468e79cae45a2f4182f9660fbaf44276604d7f"
146
+ },
147
+ {
148
+ "folder": "coding_06001_10739/07751_08000",
149
+ "receipt_sha256": "1f805b743a0ee942bfc4d2ee4693cc5355eb0d454c6862104747a0c61cb7d5b1"
150
+ },
151
+ {
152
+ "folder": "coding_06001_10739/08001_08250",
153
+ "receipt_sha256": "12aba789794634e4fa70d9ec5b2e8babcb1ce2da00b89c3fa403e97132069e3d"
154
+ },
155
+ {
156
+ "folder": "coding_06001_10739/08251_08500",
157
+ "receipt_sha256": "cc048b918f005fc7d27588567a4e5b2565eef477b57f09350de9c199ea7adb17"
158
+ },
159
+ {
160
+ "folder": "coding_06001_10739/08501_08750",
161
+ "receipt_sha256": "f4e7fdf82f98fb947eb155fd84699d1fc3fcd0c23cb7064672e63a9ab7b4c77a"
162
+ },
163
+ {
164
+ "folder": "coding_06001_10739/08751_09000",
165
+ "receipt_sha256": "b354a69b4f28c49081a802b99028238bc4c9cdb71d11d37f6b4ceef51a8b86be"
166
+ },
167
+ {
168
+ "folder": "coding_06001_10739/09001_09250",
169
+ "receipt_sha256": "d3ccd1f97c6b96785f33193b167048064d0c50bcba1a1616393023815f137f34"
170
+ },
171
+ {
172
+ "folder": "coding_06001_10739/09251_09500",
173
+ "receipt_sha256": "1743b8ec6417de7489fd6ff9862153a38127ed604c186611112e20bd77b7531b"
174
+ },
175
+ {
176
+ "folder": "coding_06001_10739/09501_09750",
177
+ "receipt_sha256": "5d09ddc894ae462d82e3946d5b1f2592fb0ec736cf5e9d862cb49abb606a647f"
178
+ },
179
+ {
180
+ "folder": "coding_06001_10739/09751_10000",
181
+ "receipt_sha256": "92a3030af7b85bceac688e6921d29fbd090675fa3cb1c2b4474c41f84eaad22e"
182
+ },
183
+ {
184
+ "folder": "coding_06001_10739/10001_10250",
185
+ "receipt_sha256": "cbd83792e9425fe8fe22988043fe1e34b824dd8d438b63950cf8bb35b3bf37c6"
186
+ },
187
+ {
188
+ "folder": "coding_06001_10739/10251_10500",
189
+ "receipt_sha256": "2d4e636d38d961b0def44df693f91a64702cd77ce59305d50e78b4852c098476"
190
+ },
191
+ {
192
+ "folder": "coding_06001_10739/10501_10739",
193
+ "receipt_sha256": "3e07bff80b0455197177e392a1fc6176f5a926c5cfcc352291afc2e5f23ecfac"
194
+ }
195
+ ],
196
+ "new_collection": false,
197
+ "expanded_B_used": false,
198
+ "new_video_coding": false,
199
+ "search_used": false,
200
+ "causal_identification": false,
201
+ "independent_new_test": false,
202
+ "analyst_seen_old_results": true,
203
+ "coding_method": "10739 explicit executor judgments plus 1771 exact earlier judgments; no keyword/classifier inference; structural checks not semantic accuracy",
204
+ "old_sampled_comparison": "Compare fine35 full observed with old fine35 sampled; do not attribute old fine35 vs new coarse13 difference solely to expanded comments"
205
+ }
supplements/20261028_buv_full_observed_regression/buv_run_full_regression.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pathlib import Path
2
+ import hashlib,json,subprocess,sys,tarfile,time
3
+ from datetime import datetime,timezone
4
+ root=Path('/root/autodl-tmp/buv_semantic_20261027/observed_corpus_20261028')
5
+ sys.path.insert(0,str(root/'code'))
6
+ from build_buv_quick_text_trial import require_cloud
7
+ require_cloud(); started=time.monotonic()
8
+ sha=lambda p:hashlib.sha256(p.read_bytes()).hexdigest()
9
+ plan=json.loads((root/'regression_plan.json').read_text())
10
+ assert sha(root/'code/fit_buv_quick_text_trial.py')==plan['fit_script_sha256']
11
+ assert sha(root/'code/fit_buv_topic_diagnostic.py')==plan['numerical_helper_sha256']
12
+ assert json.loads((root/'measurement_full_v1/coding_closure.json').read_text())['comments']==12510
13
+ out=root/'regression_full_v1';out.mkdir(exist_ok=False)
14
+ results={}
15
+ for version in plan['versions']:
16
+ with (out/(version+'.log')).open('w') as log:
17
+ proc=subprocess.run([sys.executable,str(root/'code/fit_buv_quick_text_trial.py'),'--measurement',str(root/'measurement_full_v1'/version),'--panel','/root/autodl-tmp/buv_20261027/buv_autodl_pro_transfer/input/panel30_daily_gmv.jsonl','--panel-sha256',plan['outcome_sha256'],'--out',str(out/version)],stdout=log,stderr=subprocess.STDOUT)
18
+ assert proc.returncode==0,(version,proc.returncode)
19
+ results[version]=json.loads((out/version/'summary.json').read_text())
20
+ print(json.dumps({'version':version,'status':results[version]['status'],'fits':results[version]['fits_executed']}),flush=True)
21
+ summary={'status':'FULL_OBSERVED_REGRESSION_COMPARISONS_FINISHED','versions':results,'fits_executed':sum(r['fits_executed'] for r in results.values()),'plan_sha256':sha(root/'regression_plan.json'),'elapsed_seconds':time.monotonic()-started,'finished_at_utc':datetime.now(timezone.utc).isoformat(),'causal_identification':False,'independent_new_test':False,'p_values':False}
22
+ (out/'summary.json').write_text(json.dumps(summary,ensure_ascii=False,indent=2)+'\n')
23
+ files={str(p.relative_to(out)):sha(p) for p in sorted(out.rglob('*')) if p.is_file()}
24
+ (out/'manifest.json').write_text(json.dumps({'files':files},indent=2)+'\n')
25
+ archive=root/'full_observed_results_v1.tar.gz'
26
+ with tarfile.open(archive,'w:gz') as t:
27
+ for name in ['measurement_full_v1','regression_full_v1','regression_plan.json','group_plan.json','run_full_observed.sh','run_full_regression.py','measurement_full_v1.log']:
28
+ t.add(root/name,arcname=name)
29
+ t.add(root/'code/aggregate_buv_observed_comments.py',arcname='aggregate_buv_observed_comments.py')
30
+ print(json.dumps({'archive_sha256':sha(archive),'bytes':archive.stat().st_size,'fits':summary['fits_executed']}),flush=True)
supplements/20261028_buv_full_observed_regression/coding_00251_04000.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce361a08373c93ded5349bad8533c65faf72ba89c437cc6c2afcb499d73519a7
3
+ size 303391
supplements/20261028_buv_full_observed_regression/coding_04001_05000.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a081bd539c017b30ccf3501798624f5bf7e30c3cef7971c086aad091834e825
3
+ size 87008
supplements/20261028_buv_full_observed_regression/coding_05001_06000.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3cfaf87ef597ac49c0a3f07a2e439daa4c8b71c7a5d8be2ce09e216f32943af1
3
+ size 83361
supplements/20261028_buv_full_observed_regression/coding_06001_10739.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:051f7a0fba52c6306eaba625d370efea32a6bd3aed0ed6e016bf66020847ca59
3
+ size 386174
supplements/20261028_buv_full_observed_regression/direct_judgment_provenance.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f6f0c76d0b02bbb07efef860359831dc7adb7abd7c55e90411afd1ff348ce8c3
3
+ size 330332
supplements/20261028_buv_full_observed_regression/full_observed_results_v1.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff87fa0d4beb498e4a428cbaea7a7cf93bcdb31b2cf733ec888ceb6943d81323
3
+ size 3111442
supplements/20261028_buv_full_observed_regression/manifest.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "schema": "buv-full-observed-regression-publication-v1",
3
+ "files": {
4
+ "aggregate_buv_observed_comments.py": "1587e488e9b512f4f2776fdec48f3e779397188c20713d8482fe9c18f4ca9b10",
5
+ "buv_audit_full_result_scope.py": "81e96bf76c99180baa139b1d7036e3bcd36323800628745b60efacc719f161d7",
6
+ "buv_observed_regression_plan.json": "95203cf46c5134c8ab2b166cf767abe34843b418dfb19b8a79f319bdf991dd44",
7
+ "buv_run_full_regression.py": "f46377747d8f34e245a6aefab193455972ca2721ec9f56cc6cc27c60bd7187ad",
8
+ "coding_00251_04000.tar.gz": "ce361a08373c93ded5349bad8533c65faf72ba89c437cc6c2afcb499d73519a7",
9
+ "coding_04001_05000.tar.gz": "4a081bd539c017b30ccf3501798624f5bf7e30c3cef7971c086aad091834e825",
10
+ "coding_05001_06000.tar.gz": "3cfaf87ef597ac49c0a3f07a2e439daa4c8b71c7a5d8be2ce09e216f32943af1",
11
+ "coding_06001_10739.tar.gz": "051f7a0fba52c6306eaba625d370efea32a6bd3aed0ed6e016bf66020847ca59",
12
+ "direct_judgment_provenance.tar.gz": "f6f0c76d0b02bbb07efef860359831dc7adb7abd7c55e90411afd1ff348ce8c3",
13
+ "full_observed_results_v1.tar.gz": "ff87fa0d4beb498e4a428cbaea7a7cf93bcdb31b2cf733ec888ceb6943d81323",
14
+ "regression_scope_audit.json": "7108146e3bce5a0631b88337438312976889cde8ad02a8ea4df1e9060510b2b9",
15
+ "test_buv_observed_measurement.py": "037a3b72a4df8ef30f23f3c8b87225ce97cfe75a99109385885f0205dece67e1"
16
+ },
17
+ "scope": "12,510 eligible observed September records: 1,771 exact reused plus 10,739 direct model judgments. Original B1035 and video text supply fixed; 13-group primary and 35-leaf sensitivity, 14 retrospective ordinal fits.",
18
+ "historical_complete_census": false,
19
+ "human_gold": false,
20
+ "new_collection": false,
21
+ "first_250_and_queue_revision": "4178fbcb7bd83477ba53291e3af949a86d969e6e",
22
+ "coarse_group_adoption_revision": "bc89e146d6807bc537fd905c64dd5264697171d1",
23
+ "old_partial_batch_false_flags_superseded_only_by_new_identity_closure": true
24
+ }
supplements/20261028_buv_full_observed_regression/regression_scope_audit.json ADDED
@@ -0,0 +1,1167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "coarse13": {
3
+ "strict_extra_exclusions": [
4
+ {
5
+ "video_id": "7676774775554275151",
6
+ "sample_id": "P17",
7
+ "date": "2026-09-23",
8
+ "lag_date": "2026-09-22",
9
+ "reasons": [
10
+ "lag_leave_video_out_attention_missing"
11
+ ]
12
+ },
13
+ {
14
+ "video_id": "7676774775554275151",
15
+ "sample_id": "P17",
16
+ "date": "2026-09-26",
17
+ "lag_date": "2026-09-25",
18
+ "reasons": [
19
+ "lag_leave_video_out_attention_missing"
20
+ ]
21
+ },
22
+ {
23
+ "video_id": "7676774775554275151",
24
+ "sample_id": "P17",
25
+ "date": "2026-09-30",
26
+ "lag_date": "2026-09-29",
27
+ "reasons": [
28
+ "lag_leave_video_out_attention_missing"
29
+ ]
30
+ }
31
+ ],
32
+ "main_test_days_matching_beats_baseline": 8,
33
+ "main_test_days_matching_beats_fixed_shift": 0,
34
+ "test_days": 10,
35
+ "main_rows": 749,
36
+ "strict_rows": 746,
37
+ "scenarios": {
38
+ "main": {
39
+ "all_models_converged": true,
40
+ "model_count": 3,
41
+ "messages": [
42
+ "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH",
43
+ "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH",
44
+ "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH"
45
+ ],
46
+ "summary": {
47
+ "scenario": "main",
48
+ "role_view": "broad",
49
+ "demand_field": "D_K",
50
+ "exclusion_reasons": {
51
+ "lag_global_attention_missing": 30,
52
+ "lag_leave_video_out_attention_missing": 30,
53
+ "text_supply_unmeasurable": 120,
54
+ "outcome_missing_or_not_published": 10
55
+ },
56
+ "training_rows": 489,
57
+ "test_rows": 260,
58
+ "excluded_rows": 151,
59
+ "fits_executed": 3,
60
+ "status": "COMPLETED_EXPLORATORY",
61
+ "models": {
62
+ "baseline": {
63
+ "date_equal_nll": 1.5564779325391045,
64
+ "dates": 10,
65
+ "rows": 260,
66
+ "by_date": [
67
+ {
68
+ "date": "2026-09-21",
69
+ "rows": 26,
70
+ "mean_nll": 1.6247790791342036
71
+ },
72
+ {
73
+ "date": "2026-09-22",
74
+ "rows": 26,
75
+ "mean_nll": 2.165036820604568
76
+ },
77
+ {
78
+ "date": "2026-09-23",
79
+ "rows": 26,
80
+ "mean_nll": 1.7850988827941934
81
+ },
82
+ {
83
+ "date": "2026-09-24",
84
+ "rows": 26,
85
+ "mean_nll": 1.495304811521552
86
+ },
87
+ {
88
+ "date": "2026-09-25",
89
+ "rows": 26,
90
+ "mean_nll": 1.7681086956091565
91
+ },
92
+ {
93
+ "date": "2026-09-26",
94
+ "rows": 26,
95
+ "mean_nll": 1.461168061838919
96
+ },
97
+ {
98
+ "date": "2026-09-27",
99
+ "rows": 26,
100
+ "mean_nll": 1.4557038887826566
101
+ },
102
+ {
103
+ "date": "2026-09-28",
104
+ "rows": 26,
105
+ "mean_nll": 1.5097767965644056
106
+ },
107
+ {
108
+ "date": "2026-09-29",
109
+ "rows": 26,
110
+ "mean_nll": 1.4470893824045779
111
+ },
112
+ {
113
+ "date": "2026-09-30",
114
+ "rows": 26,
115
+ "mean_nll": 0.8527129061368135
116
+ }
117
+ ],
118
+ "iterations": 114,
119
+ "max_abs_gradient": 0.00016862348845209096,
120
+ "standardized_match_beta": null
121
+ },
122
+ "match": {
123
+ "date_equal_nll": 1.5553908714644864,
124
+ "dates": 10,
125
+ "rows": 260,
126
+ "by_date": [
127
+ {
128
+ "date": "2026-09-21",
129
+ "rows": 26,
130
+ "mean_nll": 1.6253410162244566
131
+ },
132
+ {
133
+ "date": "2026-09-22",
134
+ "rows": 26,
135
+ "mean_nll": 2.164697560517418
136
+ },
137
+ {
138
+ "date": "2026-09-23",
139
+ "rows": 26,
140
+ "mean_nll": 1.7852730684109532
141
+ },
142
+ {
143
+ "date": "2026-09-24",
144
+ "rows": 26,
145
+ "mean_nll": 1.4948210209857373
146
+ },
147
+ {
148
+ "date": "2026-09-25",
149
+ "rows": 26,
150
+ "mean_nll": 1.7671575448642165
151
+ },
152
+ {
153
+ "date": "2026-09-26",
154
+ "rows": 26,
155
+ "mean_nll": 1.4603030443673692
156
+ },
157
+ {
158
+ "date": "2026-09-27",
159
+ "rows": 26,
160
+ "mean_nll": 1.4544409547599872
161
+ },
162
+ {
163
+ "date": "2026-09-28",
164
+ "rows": 26,
165
+ "mean_nll": 1.5050934258112925
166
+ },
167
+ {
168
+ "date": "2026-09-29",
169
+ "rows": 26,
170
+ "mean_nll": 1.4449073308475062
171
+ },
172
+ {
173
+ "date": "2026-09-30",
174
+ "rows": 26,
175
+ "mean_nll": 0.8518737478559266
176
+ }
177
+ ],
178
+ "iterations": 132,
179
+ "max_abs_gradient": 5.6226884403715505e-05,
180
+ "standardized_match_beta": 0.06066006537614763
181
+ },
182
+ "fixed_shift": {
183
+ "date_equal_nll": 1.5517350125966645,
184
+ "dates": 10,
185
+ "rows": 260,
186
+ "by_date": [
187
+ {
188
+ "date": "2026-09-21",
189
+ "rows": 26,
190
+ "mean_nll": 1.6230534430199421
191
+ },
192
+ {
193
+ "date": "2026-09-22",
194
+ "rows": 26,
195
+ "mean_nll": 2.161243343812792
196
+ },
197
+ {
198
+ "date": "2026-09-23",
199
+ "rows": 26,
200
+ "mean_nll": 1.7834416889865756
201
+ },
202
+ {
203
+ "date": "2026-09-24",
204
+ "rows": 26,
205
+ "mean_nll": 1.4902611215337698
206
+ },
207
+ {
208
+ "date": "2026-09-25",
209
+ "rows": 26,
210
+ "mean_nll": 1.760213364376089
211
+ },
212
+ {
213
+ "date": "2026-09-26",
214
+ "rows": 26,
215
+ "mean_nll": 1.4579071111485022
216
+ },
217
+ {
218
+ "date": "2026-09-27",
219
+ "rows": 26,
220
+ "mean_nll": 1.451058834780699
221
+ },
222
+ {
223
+ "date": "2026-09-28",
224
+ "rows": 26,
225
+ "mean_nll": 1.5045756260304586
226
+ },
227
+ {
228
+ "date": "2026-09-29",
229
+ "rows": 26,
230
+ "mean_nll": 1.44000084616127
231
+ },
232
+ {
233
+ "date": "2026-09-30",
234
+ "rows": 26,
235
+ "mean_nll": 0.8455947461165476
236
+ }
237
+ ],
238
+ "iterations": 124,
239
+ "max_abs_gradient": 4.955528410664767e-05,
240
+ "standardized_match_beta": -0.13682589905820886
241
+ }
242
+ },
243
+ "control_equivalent": false,
244
+ "video_count": 26,
245
+ "test_dates": [
246
+ "2026-09-21",
247
+ "2026-09-22",
248
+ "2026-09-23",
249
+ "2026-09-24",
250
+ "2026-09-25",
251
+ "2026-09-26",
252
+ "2026-09-27",
253
+ "2026-09-28",
254
+ "2026-09-29",
255
+ "2026-09-30"
256
+ ],
257
+ "pca_rank": 12
258
+ }
259
+ },
260
+ "unweighted": {
261
+ "all_models_converged": true,
262
+ "model_count": 2,
263
+ "messages": [
264
+ "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH",
265
+ "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH"
266
+ ],
267
+ "summary": {
268
+ "scenario": "unweighted",
269
+ "role_view": "broad",
270
+ "demand_field": "p_K",
271
+ "exclusion_reasons": {
272
+ "lag_global_attention_missing": 30,
273
+ "lag_leave_video_out_attention_missing": 30,
274
+ "text_supply_unmeasurable": 120,
275
+ "outcome_missing_or_not_published": 10
276
+ },
277
+ "training_rows": 489,
278
+ "test_rows": 260,
279
+ "excluded_rows": 151,
280
+ "fits_executed": 2,
281
+ "status": "COMPLETED_EXPLORATORY",
282
+ "models": {
283
+ "baseline": {
284
+ "date_equal_nll": 1.5514441202240012,
285
+ "dates": 10,
286
+ "rows": 260,
287
+ "by_date": [
288
+ {
289
+ "date": "2026-09-21",
290
+ "rows": 26,
291
+ "mean_nll": 1.6249974438651233
292
+ },
293
+ {
294
+ "date": "2026-09-22",
295
+ "rows": 26,
296
+ "mean_nll": 2.178692430543998
297
+ },
298
+ {
299
+ "date": "2026-09-23",
300
+ "rows": 26,
301
+ "mean_nll": 1.7958561200828038
302
+ },
303
+ {
304
+ "date": "2026-09-24",
305
+ "rows": 26,
306
+ "mean_nll": 1.495324605873768
307
+ },
308
+ {
309
+ "date": "2026-09-25",
310
+ "rows": 26,
311
+ "mean_nll": 1.7662364633829593
312
+ },
313
+ {
314
+ "date": "2026-09-26",
315
+ "rows": 26,
316
+ "mean_nll": 1.460704368735715
317
+ },
318
+ {
319
+ "date": "2026-09-27",
320
+ "rows": 26,
321
+ "mean_nll": 1.4540654836145277
322
+ },
323
+ {
324
+ "date": "2026-09-28",
325
+ "rows": 26,
326
+ "mean_nll": 1.5084462670538004
327
+ },
328
+ {
329
+ "date": "2026-09-29",
330
+ "rows": 26,
331
+ "mean_nll": 1.4179229582811568
332
+ },
333
+ {
334
+ "date": "2026-09-30",
335
+ "rows": 26,
336
+ "mean_nll": 0.8121950608061603
337
+ }
338
+ ],
339
+ "iterations": 116,
340
+ "max_abs_gradient": 7.896006808210415e-05,
341
+ "standardized_match_beta": null
342
+ },
343
+ "match": {
344
+ "date_equal_nll": 1.5534973406140777,
345
+ "dates": 10,
346
+ "rows": 260,
347
+ "by_date": [
348
+ {
349
+ "date": "2026-09-21",
350
+ "rows": 26,
351
+ "mean_nll": 1.6222528259638846
352
+ },
353
+ {
354
+ "date": "2026-09-22",
355
+ "rows": 26,
356
+ "mean_nll": 2.178248739620229
357
+ },
358
+ {
359
+ "date": "2026-09-23",
360
+ "rows": 26,
361
+ "mean_nll": 1.7966398730204114
362
+ },
363
+ {
364
+ "date": "2026-09-24",
365
+ "rows": 26,
366
+ "mean_nll": 1.4953314261257233
367
+ },
368
+ {
369
+ "date": "2026-09-25",
370
+ "rows": 26,
371
+ "mean_nll": 1.7670180427620379
372
+ },
373
+ {
374
+ "date": "2026-09-26",
375
+ "rows": 26,
376
+ "mean_nll": 1.461524152417648
377
+ },
378
+ {
379
+ "date": "2026-09-27",
380
+ "rows": 26,
381
+ "mean_nll": 1.458623040094023
382
+ },
383
+ {
384
+ "date": "2026-09-28",
385
+ "rows": 26,
386
+ "mean_nll": 1.5194423626171898
387
+ },
388
+ {
389
+ "date": "2026-09-29",
390
+ "rows": 26,
391
+ "mean_nll": 1.4246193482251366
392
+ },
393
+ {
394
+ "date": "2026-09-30",
395
+ "rows": 26,
396
+ "mean_nll": 0.8112735952944933
397
+ }
398
+ ],
399
+ "iterations": 126,
400
+ "max_abs_gradient": 0.00013530255651846013,
401
+ "standardized_match_beta": -0.13039961619739696
402
+ }
403
+ },
404
+ "control_equivalent": false,
405
+ "video_count": 26,
406
+ "test_dates": [
407
+ "2026-09-21",
408
+ "2026-09-22",
409
+ "2026-09-23",
410
+ "2026-09-24",
411
+ "2026-09-25",
412
+ "2026-09-26",
413
+ "2026-09-27",
414
+ "2026-09-28",
415
+ "2026-09-29",
416
+ "2026-09-30"
417
+ ],
418
+ "pca_rank": 12
419
+ }
420
+ },
421
+ "strict_non_author": {
422
+ "all_models_converged": true,
423
+ "model_count": 2,
424
+ "messages": [
425
+ "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH",
426
+ "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH"
427
+ ],
428
+ "summary": {
429
+ "scenario": "strict_non_author",
430
+ "role_view": "strict_non_author",
431
+ "demand_field": "D_K",
432
+ "exclusion_reasons": {
433
+ "lag_global_attention_missing": 30,
434
+ "lag_leave_video_out_attention_missing": 33,
435
+ "text_supply_unmeasurable": 120,
436
+ "outcome_missing_or_not_published": 10
437
+ },
438
+ "training_rows": 489,
439
+ "test_rows": 257,
440
+ "excluded_rows": 154,
441
+ "fits_executed": 2,
442
+ "status": "COMPLETED_EXPLORATORY",
443
+ "models": {
444
+ "baseline": {
445
+ "date_equal_nll": 1.5608166089560855,
446
+ "dates": 10,
447
+ "rows": 257,
448
+ "by_date": [
449
+ {
450
+ "date": "2026-09-21",
451
+ "rows": 26,
452
+ "mean_nll": 1.6285997305934123
453
+ },
454
+ {
455
+ "date": "2026-09-22",
456
+ "rows": 26,
457
+ "mean_nll": 2.1945411683321163
458
+ },
459
+ {
460
+ "date": "2026-09-23",
461
+ "rows": 25,
462
+ "mean_nll": 1.7942332535766932
463
+ },
464
+ {
465
+ "date": "2026-09-24",
466
+ "rows": 26,
467
+ "mean_nll": 1.5083533168909715
468
+ },
469
+ {
470
+ "date": "2026-09-25",
471
+ "rows": 26,
472
+ "mean_nll": 1.7828131304814936
473
+ },
474
+ {
475
+ "date": "2026-09-26",
476
+ "rows": 25,
477
+ "mean_nll": 1.5006756655267501
478
+ },
479
+ {
480
+ "date": "2026-09-27",
481
+ "rows": 26,
482
+ "mean_nll": 1.4651661213121363
483
+ },
484
+ {
485
+ "date": "2026-09-28",
486
+ "rows": 26,
487
+ "mean_nll": 1.5163146400055902
488
+ },
489
+ {
490
+ "date": "2026-09-29",
491
+ "rows": 26,
492
+ "mean_nll": 1.42000777272776
493
+ },
494
+ {
495
+ "date": "2026-09-30",
496
+ "rows": 25,
497
+ "mean_nll": 0.7974612901139322
498
+ }
499
+ ],
500
+ "iterations": 112,
501
+ "max_abs_gradient": 8.037507112720887e-05,
502
+ "standardized_match_beta": null
503
+ },
504
+ "match": {
505
+ "date_equal_nll": 1.5619208032238583,
506
+ "dates": 10,
507
+ "rows": 257,
508
+ "by_date": [
509
+ {
510
+ "date": "2026-09-21",
511
+ "rows": 26,
512
+ "mean_nll": 1.6263968970269584
513
+ },
514
+ {
515
+ "date": "2026-09-22",
516
+ "rows": 26,
517
+ "mean_nll": 2.197018614387163
518
+ },
519
+ {
520
+ "date": "2026-09-23",
521
+ "rows": 25,
522
+ "mean_nll": 1.7874249732969139
523
+ },
524
+ {
525
+ "date": "2026-09-24",
526
+ "rows": 26,
527
+ "mean_nll": 1.511602920223125
528
+ },
529
+ {
530
+ "date": "2026-09-25",
531
+ "rows": 26,
532
+ "mean_nll": 1.7824902852369808
533
+ },
534
+ {
535
+ "date": "2026-09-26",
536
+ "rows": 25,
537
+ "mean_nll": 1.4994791551309012
538
+ },
539
+ {
540
+ "date": "2026-09-27",
541
+ "rows": 26,
542
+ "mean_nll": 1.4672679922540983
543
+ },
544
+ {
545
+ "date": "2026-09-28",
546
+ "rows": 26,
547
+ "mean_nll": 1.523209113954881
548
+ },
549
+ {
550
+ "date": "2026-09-29",
551
+ "rows": 26,
552
+ "mean_nll": 1.4259067272032924
553
+ },
554
+ {
555
+ "date": "2026-09-30",
556
+ "rows": 25,
557
+ "mean_nll": 0.7984113535242675
558
+ }
559
+ ],
560
+ "iterations": 102,
561
+ "max_abs_gradient": 5.728575166571378e-05,
562
+ "standardized_match_beta": -0.0304993945904542
563
+ }
564
+ },
565
+ "control_equivalent": false,
566
+ "video_count": 26,
567
+ "test_dates": [
568
+ "2026-09-21",
569
+ "2026-09-22",
570
+ "2026-09-23",
571
+ "2026-09-24",
572
+ "2026-09-25",
573
+ "2026-09-26",
574
+ "2026-09-27",
575
+ "2026-09-28",
576
+ "2026-09-29",
577
+ "2026-09-30"
578
+ ],
579
+ "pca_rank": 12
580
+ }
581
+ }
582
+ }
583
+ },
584
+ "fine35": {
585
+ "strict_extra_exclusions": [
586
+ {
587
+ "video_id": "7676774775554275151",
588
+ "sample_id": "P17",
589
+ "date": "2026-09-23",
590
+ "lag_date": "2026-09-22",
591
+ "reasons": [
592
+ "lag_leave_video_out_attention_missing"
593
+ ]
594
+ },
595
+ {
596
+ "video_id": "7676774775554275151",
597
+ "sample_id": "P17",
598
+ "date": "2026-09-26",
599
+ "lag_date": "2026-09-25",
600
+ "reasons": [
601
+ "lag_leave_video_out_attention_missing"
602
+ ]
603
+ },
604
+ {
605
+ "video_id": "7676774775554275151",
606
+ "sample_id": "P17",
607
+ "date": "2026-09-30",
608
+ "lag_date": "2026-09-29",
609
+ "reasons": [
610
+ "lag_leave_video_out_attention_missing"
611
+ ]
612
+ }
613
+ ],
614
+ "main_test_days_matching_beats_baseline": 3,
615
+ "main_test_days_matching_beats_fixed_shift": 2,
616
+ "test_days": 10,
617
+ "main_rows": 749,
618
+ "strict_rows": 746,
619
+ "scenarios": {
620
+ "main": {
621
+ "all_models_converged": true,
622
+ "model_count": 3,
623
+ "messages": [
624
+ "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH",
625
+ "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH",
626
+ "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH"
627
+ ],
628
+ "summary": {
629
+ "scenario": "main",
630
+ "role_view": "broad",
631
+ "demand_field": "D_K",
632
+ "exclusion_reasons": {
633
+ "lag_global_attention_missing": 30,
634
+ "lag_leave_video_out_attention_missing": 30,
635
+ "text_supply_unmeasurable": 120,
636
+ "outcome_missing_or_not_published": 10
637
+ },
638
+ "training_rows": 489,
639
+ "test_rows": 260,
640
+ "excluded_rows": 151,
641
+ "fits_executed": 3,
642
+ "status": "COMPLETED_EXPLORATORY",
643
+ "models": {
644
+ "baseline": {
645
+ "date_equal_nll": 1.5438285917498973,
646
+ "dates": 10,
647
+ "rows": 260,
648
+ "by_date": [
649
+ {
650
+ "date": "2026-09-21",
651
+ "rows": 26,
652
+ "mean_nll": 1.6258505618374608
653
+ },
654
+ {
655
+ "date": "2026-09-22",
656
+ "rows": 26,
657
+ "mean_nll": 2.2656921585388043
658
+ },
659
+ {
660
+ "date": "2026-09-23",
661
+ "rows": 26,
662
+ "mean_nll": 1.7582622634742864
663
+ },
664
+ {
665
+ "date": "2026-09-24",
666
+ "rows": 26,
667
+ "mean_nll": 1.495845639365187
668
+ },
669
+ {
670
+ "date": "2026-09-25",
671
+ "rows": 26,
672
+ "mean_nll": 1.765275476420465
673
+ },
674
+ {
675
+ "date": "2026-09-26",
676
+ "rows": 26,
677
+ "mean_nll": 1.4527656638773114
678
+ },
679
+ {
680
+ "date": "2026-09-27",
681
+ "rows": 26,
682
+ "mean_nll": 1.445473706928854
683
+ },
684
+ {
685
+ "date": "2026-09-28",
686
+ "rows": 26,
687
+ "mean_nll": 1.5102847046027408
688
+ },
689
+ {
690
+ "date": "2026-09-29",
691
+ "rows": 26,
692
+ "mean_nll": 1.4320314528503293
693
+ },
694
+ {
695
+ "date": "2026-09-30",
696
+ "rows": 26,
697
+ "mean_nll": 0.6868042896035346
698
+ }
699
+ ],
700
+ "iterations": 106,
701
+ "max_abs_gradient": 0.0002181697306203878,
702
+ "standardized_match_beta": null
703
+ },
704
+ "match": {
705
+ "date_equal_nll": 1.5458065325511503,
706
+ "dates": 10,
707
+ "rows": 260,
708
+ "by_date": [
709
+ {
710
+ "date": "2026-09-21",
711
+ "rows": 26,
712
+ "mean_nll": 1.6226862628202825
713
+ },
714
+ {
715
+ "date": "2026-09-22",
716
+ "rows": 26,
717
+ "mean_nll": 2.2662196651355666
718
+ },
719
+ {
720
+ "date": "2026-09-23",
721
+ "rows": 26,
722
+ "mean_nll": 1.758211988398588
723
+ },
724
+ {
725
+ "date": "2026-09-24",
726
+ "rows": 26,
727
+ "mean_nll": 1.496215105460621
728
+ },
729
+ {
730
+ "date": "2026-09-25",
731
+ "rows": 26,
732
+ "mean_nll": 1.7670461263787134
733
+ },
734
+ {
735
+ "date": "2026-09-26",
736
+ "rows": 26,
737
+ "mean_nll": 1.4536649169985745
738
+ },
739
+ {
740
+ "date": "2026-09-27",
741
+ "rows": 26,
742
+ "mean_nll": 1.4499562200590086
743
+ },
744
+ {
745
+ "date": "2026-09-28",
746
+ "rows": 26,
747
+ "mean_nll": 1.5261935337628716
748
+ },
749
+ {
750
+ "date": "2026-09-29",
751
+ "rows": 26,
752
+ "mean_nll": 1.4310480753418844
753
+ },
754
+ {
755
+ "date": "2026-09-30",
756
+ "rows": 26,
757
+ "mean_nll": 0.6868234311553921
758
+ }
759
+ ],
760
+ "iterations": 120,
761
+ "max_abs_gradient": 0.00018976368473927474,
762
+ "standardized_match_beta": -0.11547568366693826
763
+ },
764
+ "fixed_shift": {
765
+ "date_equal_nll": 1.5436453337982985,
766
+ "dates": 10,
767
+ "rows": 260,
768
+ "by_date": [
769
+ {
770
+ "date": "2026-09-21",
771
+ "rows": 26,
772
+ "mean_nll": 1.625845053127783
773
+ },
774
+ {
775
+ "date": "2026-09-22",
776
+ "rows": 26,
777
+ "mean_nll": 2.265892150391745
778
+ },
779
+ {
780
+ "date": "2026-09-23",
781
+ "rows": 26,
782
+ "mean_nll": 1.758195676852821
783
+ },
784
+ {
785
+ "date": "2026-09-24",
786
+ "rows": 26,
787
+ "mean_nll": 1.4957818502140598
788
+ },
789
+ {
790
+ "date": "2026-09-25",
791
+ "rows": 26,
792
+ "mean_nll": 1.7652455322114864
793
+ },
794
+ {
795
+ "date": "2026-09-26",
796
+ "rows": 26,
797
+ "mean_nll": 1.4518227267328803
798
+ },
799
+ {
800
+ "date": "2026-09-27",
801
+ "rows": 26,
802
+ "mean_nll": 1.4450309903022105
803
+ },
804
+ {
805
+ "date": "2026-09-28",
806
+ "rows": 26,
807
+ "mean_nll": 1.5107344930393878
808
+ },
809
+ {
810
+ "date": "2026-09-29",
811
+ "rows": 26,
812
+ "mean_nll": 1.4314552850083555
813
+ },
814
+ {
815
+ "date": "2026-09-30",
816
+ "rows": 26,
817
+ "mean_nll": 0.6864495801022557
818
+ }
819
+ ],
820
+ "iterations": 118,
821
+ "max_abs_gradient": 0.00017956194628898636,
822
+ "standardized_match_beta": -0.024662488827977502
823
+ }
824
+ },
825
+ "control_equivalent": false,
826
+ "video_count": 26,
827
+ "test_dates": [
828
+ "2026-09-21",
829
+ "2026-09-22",
830
+ "2026-09-23",
831
+ "2026-09-24",
832
+ "2026-09-25",
833
+ "2026-09-26",
834
+ "2026-09-27",
835
+ "2026-09-28",
836
+ "2026-09-29",
837
+ "2026-09-30"
838
+ ],
839
+ "pca_rank": 18
840
+ }
841
+ },
842
+ "unweighted": {
843
+ "all_models_converged": true,
844
+ "model_count": 2,
845
+ "messages": [
846
+ "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH",
847
+ "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH"
848
+ ],
849
+ "summary": {
850
+ "scenario": "unweighted",
851
+ "role_view": "broad",
852
+ "demand_field": "p_K",
853
+ "exclusion_reasons": {
854
+ "lag_global_attention_missing": 30,
855
+ "lag_leave_video_out_attention_missing": 30,
856
+ "text_supply_unmeasurable": 120,
857
+ "outcome_missing_or_not_published": 10
858
+ },
859
+ "training_rows": 489,
860
+ "test_rows": 260,
861
+ "excluded_rows": 151,
862
+ "fits_executed": 2,
863
+ "status": "COMPLETED_EXPLORATORY",
864
+ "models": {
865
+ "baseline": {
866
+ "date_equal_nll": 1.5471412471653967,
867
+ "dates": 10,
868
+ "rows": 260,
869
+ "by_date": [
870
+ {
871
+ "date": "2026-09-21",
872
+ "rows": 26,
873
+ "mean_nll": 1.6263119615171826
874
+ },
875
+ {
876
+ "date": "2026-09-22",
877
+ "rows": 26,
878
+ "mean_nll": 2.2430157853268042
879
+ },
880
+ {
881
+ "date": "2026-09-23",
882
+ "rows": 26,
883
+ "mean_nll": 1.78001199925333
884
+ },
885
+ {
886
+ "date": "2026-09-24",
887
+ "rows": 26,
888
+ "mean_nll": 1.4960842112682013
889
+ },
890
+ {
891
+ "date": "2026-09-25",
892
+ "rows": 26,
893
+ "mean_nll": 1.7669154389530084
894
+ },
895
+ {
896
+ "date": "2026-09-26",
897
+ "rows": 26,
898
+ "mean_nll": 1.4575378425236496
899
+ },
900
+ {
901
+ "date": "2026-09-27",
902
+ "rows": 26,
903
+ "mean_nll": 1.4491501963840818
904
+ },
905
+ {
906
+ "date": "2026-09-28",
907
+ "rows": 26,
908
+ "mean_nll": 1.519299023849586
909
+ },
910
+ {
911
+ "date": "2026-09-29",
912
+ "rows": 26,
913
+ "mean_nll": 1.4110214526649967
914
+ },
915
+ {
916
+ "date": "2026-09-30",
917
+ "rows": 26,
918
+ "mean_nll": 0.722064559913126
919
+ }
920
+ ],
921
+ "iterations": 110,
922
+ "max_abs_gradient": 7.145013430348568e-05,
923
+ "standardized_match_beta": null
924
+ },
925
+ "match": {
926
+ "date_equal_nll": 1.5502699544525078,
927
+ "dates": 10,
928
+ "rows": 260,
929
+ "by_date": [
930
+ {
931
+ "date": "2026-09-21",
932
+ "rows": 26,
933
+ "mean_nll": 1.6187656688356604
934
+ },
935
+ {
936
+ "date": "2026-09-22",
937
+ "rows": 26,
938
+ "mean_nll": 2.2428631332073152
939
+ },
940
+ {
941
+ "date": "2026-09-23",
942
+ "rows": 26,
943
+ "mean_nll": 1.783609138193793
944
+ },
945
+ {
946
+ "date": "2026-09-24",
947
+ "rows": 26,
948
+ "mean_nll": 1.4954381140771174
949
+ },
950
+ {
951
+ "date": "2026-09-25",
952
+ "rows": 26,
953
+ "mean_nll": 1.7691819289139032
954
+ },
955
+ {
956
+ "date": "2026-09-26",
957
+ "rows": 26,
958
+ "mean_nll": 1.459626254864609
959
+ },
960
+ {
961
+ "date": "2026-09-27",
962
+ "rows": 26,
963
+ "mean_nll": 1.4567372383785708
964
+ },
965
+ {
966
+ "date": "2026-09-28",
967
+ "rows": 26,
968
+ "mean_nll": 1.5419096987409608
969
+ },
970
+ {
971
+ "date": "2026-09-29",
972
+ "rows": 26,
973
+ "mean_nll": 1.4153807361709754
974
+ },
975
+ {
976
+ "date": "2026-09-30",
977
+ "rows": 26,
978
+ "mean_nll": 0.7191876331421739
979
+ }
980
+ ],
981
+ "iterations": 122,
982
+ "max_abs_gradient": 0.00014188513487167764,
983
+ "standardized_match_beta": -0.16781756417330668
984
+ }
985
+ },
986
+ "control_equivalent": false,
987
+ "video_count": 26,
988
+ "test_dates": [
989
+ "2026-09-21",
990
+ "2026-09-22",
991
+ "2026-09-23",
992
+ "2026-09-24",
993
+ "2026-09-25",
994
+ "2026-09-26",
995
+ "2026-09-27",
996
+ "2026-09-28",
997
+ "2026-09-29",
998
+ "2026-09-30"
999
+ ],
1000
+ "pca_rank": 18
1001
+ }
1002
+ },
1003
+ "strict_non_author": {
1004
+ "all_models_converged": true,
1005
+ "model_count": 2,
1006
+ "messages": [
1007
+ "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH",
1008
+ "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH"
1009
+ ],
1010
+ "summary": {
1011
+ "scenario": "strict_non_author",
1012
+ "role_view": "strict_non_author",
1013
+ "demand_field": "D_K",
1014
+ "exclusion_reasons": {
1015
+ "lag_global_attention_missing": 30,
1016
+ "lag_leave_video_out_attention_missing": 33,
1017
+ "text_supply_unmeasurable": 120,
1018
+ "outcome_missing_or_not_published": 10
1019
+ },
1020
+ "training_rows": 489,
1021
+ "test_rows": 257,
1022
+ "excluded_rows": 154,
1023
+ "fits_executed": 2,
1024
+ "status": "COMPLETED_EXPLORATORY",
1025
+ "models": {
1026
+ "baseline": {
1027
+ "date_equal_nll": 1.566747196505531,
1028
+ "dates": 10,
1029
+ "rows": 257,
1030
+ "by_date": [
1031
+ {
1032
+ "date": "2026-09-21",
1033
+ "rows": 26,
1034
+ "mean_nll": 1.6358350883459338
1035
+ },
1036
+ {
1037
+ "date": "2026-09-22",
1038
+ "rows": 26,
1039
+ "mean_nll": 2.215697315163847
1040
+ },
1041
+ {
1042
+ "date": "2026-09-23",
1043
+ "rows": 25,
1044
+ "mean_nll": 1.794830361610756
1045
+ },
1046
+ {
1047
+ "date": "2026-09-24",
1048
+ "rows": 26,
1049
+ "mean_nll": 1.500766129658382
1050
+ },
1051
+ {
1052
+ "date": "2026-09-25",
1053
+ "rows": 26,
1054
+ "mean_nll": 1.769712763584354
1055
+ },
1056
+ {
1057
+ "date": "2026-09-26",
1058
+ "rows": 25,
1059
+ "mean_nll": 1.4997528351597658
1060
+ },
1061
+ {
1062
+ "date": "2026-09-27",
1063
+ "rows": 26,
1064
+ "mean_nll": 1.4603198515619873
1065
+ },
1066
+ {
1067
+ "date": "2026-09-28",
1068
+ "rows": 26,
1069
+ "mean_nll": 1.5224684903312504
1070
+ },
1071
+ {
1072
+ "date": "2026-09-29",
1073
+ "rows": 26,
1074
+ "mean_nll": 1.3758784931048185
1075
+ },
1076
+ {
1077
+ "date": "2026-09-30",
1078
+ "rows": 25,
1079
+ "mean_nll": 0.8922106365342163
1080
+ }
1081
+ ],
1082
+ "iterations": 110,
1083
+ "max_abs_gradient": 0.00037879951245103904,
1084
+ "standardized_match_beta": null
1085
+ },
1086
+ "match": {
1087
+ "date_equal_nll": 1.5670729141008866,
1088
+ "dates": 10,
1089
+ "rows": 257,
1090
+ "by_date": [
1091
+ {
1092
+ "date": "2026-09-21",
1093
+ "rows": 26,
1094
+ "mean_nll": 1.6381573785518522
1095
+ },
1096
+ {
1097
+ "date": "2026-09-22",
1098
+ "rows": 26,
1099
+ "mean_nll": 2.210951665714179
1100
+ },
1101
+ {
1102
+ "date": "2026-09-23",
1103
+ "rows": 25,
1104
+ "mean_nll": 1.8068841867161505
1105
+ },
1106
+ {
1107
+ "date": "2026-09-24",
1108
+ "rows": 26,
1109
+ "mean_nll": 1.5009722241506191
1110
+ },
1111
+ {
1112
+ "date": "2026-09-25",
1113
+ "rows": 26,
1114
+ "mean_nll": 1.7723752092491603
1115
+ },
1116
+ {
1117
+ "date": "2026-09-26",
1118
+ "rows": 25,
1119
+ "mean_nll": 1.501227810953366
1120
+ },
1121
+ {
1122
+ "date": "2026-09-27",
1123
+ "rows": 26,
1124
+ "mean_nll": 1.4659450709520512
1125
+ },
1126
+ {
1127
+ "date": "2026-09-28",
1128
+ "rows": 26,
1129
+ "mean_nll": 1.5120433620570612
1130
+ },
1131
+ {
1132
+ "date": "2026-09-29",
1133
+ "rows": 26,
1134
+ "mean_nll": 1.370056621155724
1135
+ },
1136
+ {
1137
+ "date": "2026-09-30",
1138
+ "rows": 25,
1139
+ "mean_nll": 0.892115611508703
1140
+ }
1141
+ ],
1142
+ "iterations": 123,
1143
+ "max_abs_gradient": 0.00014199701757722227,
1144
+ "standardized_match_beta": 0.047227962697331205
1145
+ }
1146
+ },
1147
+ "control_equivalent": false,
1148
+ "video_count": 26,
1149
+ "test_dates": [
1150
+ "2026-09-21",
1151
+ "2026-09-22",
1152
+ "2026-09-23",
1153
+ "2026-09-24",
1154
+ "2026-09-25",
1155
+ "2026-09-26",
1156
+ "2026-09-27",
1157
+ "2026-09-28",
1158
+ "2026-09-29",
1159
+ "2026-09-30"
1160
+ ],
1161
+ "pca_rank": 18
1162
+ }
1163
+ }
1164
+ }
1165
+ },
1166
+ "no_refitting": true
1167
+ }
supplements/20261028_buv_full_observed_regression/test_buv_observed_measurement.py ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Synthetic identity, denominator and coarse-vote invariants; no real data."""
2
+ import hashlib
3
+ from pathlib import Path
4
+ import sys
5
+ import unittest
6
+
7
+ sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
8
+ from aggregate_buv_observed_comments import close_census, daily_measurement
9
+ from compare_buv_coarse_measurement import collapse_judgments, coarse_prior
10
+ from aggregate_buv_context_direct import votes
11
+
12
+
13
+ def source(i, video='v'):
14
+ return dict(coding_id=str(i), record_id=str(i), video_id=video, source_frame='S',
15
+ raw_text='text'+str(i), is_source_author=False, role='non_author',
16
+ created_at_beijing='2026-09-01T00:00:00+08:00', inclusion_probability=1,
17
+ sample_n=2, population_N=2, broad_duplicate_weight=1., strict_duplicate_weight=1.)
18
+
19
+
20
+ def judgment(row, leaves, unknown=False):
21
+ return dict(input_id=row['coding_id'], video_id=row['video_id'], kind='comment',
22
+ own_text_sha256=hashlib.sha256(row['raw_text'].encode()).hexdigest(), status='coded',
23
+ residual_unknown=unknown, mentions=[dict(leaf_id=k, own_quote=row['raw_text'],
24
+ scope='本品关联', aspect_status='确定') for k in leaves])
25
+
26
+
27
+ class ObservedMeasurementTests(unittest.TestCase):
28
+ def test_missing_extra_and_duplicate_judgments_fail(self):
29
+ q=[source(1),source(2)]; j=[judgment(r,[]) for r in q]
30
+ self.assertEqual(set(close_census(q,j,['a'])), {'1','2'})
31
+ for bad in (j[:1], j+j[:1], j+[judgment(source(3),[])]):
32
+ with self.assertRaises(ValueError): close_census(q,bad,['a'])
33
+
34
+ def test_unknown_stays_in_denominator_and_leave_out_removes_focal_only(self):
35
+ q=[source(1,'focal'),source(2,'other')]
36
+ j=[judgment(q[0],['a']),judgment(q[1],[],True)]
37
+ labels=close_census(q,j,['a'])
38
+ rows=daily_measurement(q,labels,['a'],[1.],['focal'])
39
+ total=next(r for r in rows if r['date']=='2026-09-01' and r['role_view']=='broad' and r['leave_out_video']=='ALL_S')
40
+ loo=next(r for r in rows if r['date']=='2026-09-01' and r['role_view']=='broad' and r['leave_out_video']=='focal')
41
+ self.assertEqual((total['record_weight_denominator'],total['mapping_coverage']), (2.,.5))
42
+ self.assertEqual(total['sampling_variance_C_K'], [0.])
43
+ self.assertEqual(loo['record_weight_denominator'],1.)
44
+ self.assertEqual(loo['estimated_unknown_share'],1.)
45
+ self.assertIsNone(loo['D_K'])
46
+
47
+ def test_family_union_is_not_sum_of_fine_probabilities(self):
48
+ mapping={'a':'g','b':'g','c':'h'}
49
+ j=judgment(source(1),['a','b','c'])
50
+ self.assertEqual(votes(collapse_judgments([j],mapping)[0],['g','h']),{'g','h'})
51
+ old=dict(record_votes=[dict(C_votes=['a','b','c'],month='2026-08',weight=1.)],
52
+ effective_months=['2026-08'])
53
+ self.assertEqual(coarse_prior(old,mapping,['g','h'])['pi_K'],[.5,.5])
54
+
55
+
56
+ if __name__=='__main__': unittest.main()