Datasets:
Preserve approved native seven-topic labels, weights, and fixed-specification regression comparison
Browse files- supplements/20261030_buv_native7_measurement_regression/MANIFEST.json +46 -0
- supplements/20261030_buv_native7_measurement_regression/execution_plan.json +112 -0
- supplements/20261030_buv_native7_measurement_regression/measurement_summary.json +87 -0
- supplements/20261030_buv_native7_measurement_regression/native7_complete.tar.gz +3 -0
- supplements/20261030_buv_native7_measurement_regression/regression_summary.json +724 -0
- supplements/20261030_buv_native7_measurement_regression/retrieval_receipt.json +8 -0
- supplements/20261030_buv_native7_measurement_regression/run_buv_native7.py +324 -0
- supplements/20261030_buv_native7_measurement_regression/test_buv_native7.py +73 -0
- supplements/20261030_buv_native7_measurement_regression/topic_support.json +58 -0
supplements/20261030_buv_native7_measurement_regression/MANIFEST.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": 1,
|
| 3 |
+
"status": "COMPLETED_EXPLORATORY_NOT_HUMAN_GOLD",
|
| 4 |
+
"files": [
|
| 5 |
+
{
|
| 6 |
+
"path": "execution_plan.json",
|
| 7 |
+
"bytes": 6147,
|
| 8 |
+
"sha256": "008782229e2b5d0cc18d6d3819eda398b5bd6bd61a33bbadaef91f3d0d986466"
|
| 9 |
+
},
|
| 10 |
+
{
|
| 11 |
+
"path": "measurement_summary.json",
|
| 12 |
+
"bytes": 1737,
|
| 13 |
+
"sha256": "a460468a7c094bdb324fc36d45a7999e51341d453ef4af4bb3013e28adfb1df1"
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
"path": "native7_complete.tar.gz",
|
| 17 |
+
"bytes": 11521160,
|
| 18 |
+
"sha256": "0c99b9b2fafe40550f941ccedbbda669f6b61267584d2025eaadb6363eba3a51"
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"path": "regression_summary.json",
|
| 22 |
+
"bytes": 20242,
|
| 23 |
+
"sha256": "f2a45517a756453de651e6bbfc6a070718374ab8b8d7efc97533a849274e16a2"
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"path": "retrieval_receipt.json",
|
| 27 |
+
"bytes": 290,
|
| 28 |
+
"sha256": "b3d059e6fb1737c02b8073a817e0b2e8f1df2b2736e54282ff3107a45d7714b9"
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"path": "run_buv_native7.py",
|
| 32 |
+
"bytes": 17804,
|
| 33 |
+
"sha256": "2fadc1efe9a23313188a382ae89a77b87ccb577adc69605385058f3ede91bf3a"
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"path": "test_buv_native7.py",
|
| 37 |
+
"bytes": 3539,
|
| 38 |
+
"sha256": "d5c82211b3a94a13bb4654a62ebe84b53b77ca47f544f17179ad2646a6dcb637"
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"path": "topic_support.json",
|
| 42 |
+
"bytes": 1116,
|
| 43 |
+
"sha256": "e89ef531911b8a4530b691201165e3c4c381101c2e49b09c7b40626dad3393b1"
|
| 44 |
+
}
|
| 45 |
+
]
|
| 46 |
+
}
|
supplements/20261030_buv_native7_measurement_regression/execution_plan.json
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": "native7-approved-screen-fixed-regression-v1",
|
| 3 |
+
"frozen_at_utc": "2026-10-30T09:50:06.306140+00:00",
|
| 4 |
+
"status": "AUTHORIZED_FOR_EXECUTION_NOT_AN_INDEPENDENT_PREREGISTRATION",
|
| 5 |
+
"user_authorization": "好的,就按照你目前这套删改方案,然后用你七个保留的主题去给所有的评论和视频的句子做一下分类,分类完之后再看一下新的回归结果,可以吧。",
|
| 6 |
+
"review_sha256": "4aa4de55bf86b10d728e6263141a419b90a980bf08da72b06febaa399b183f58",
|
| 7 |
+
"retained": [
|
| 8 |
+
1,
|
| 9 |
+
11,
|
| 10 |
+
12,
|
| 11 |
+
14,
|
| 12 |
+
21,
|
| 13 |
+
28,
|
| 14 |
+
29
|
| 15 |
+
],
|
| 16 |
+
"held": [
|
| 17 |
+
0,
|
| 18 |
+
7,
|
| 19 |
+
9,
|
| 20 |
+
10,
|
| 21 |
+
13,
|
| 22 |
+
15,
|
| 23 |
+
16,
|
| 24 |
+
22,
|
| 25 |
+
24
|
| 26 |
+
],
|
| 27 |
+
"excluded": [
|
| 28 |
+
2,
|
| 29 |
+
3,
|
| 30 |
+
4,
|
| 31 |
+
5,
|
| 32 |
+
6,
|
| 33 |
+
8,
|
| 34 |
+
17,
|
| 35 |
+
18,
|
| 36 |
+
19,
|
| 37 |
+
20,
|
| 38 |
+
23,
|
| 39 |
+
25,
|
| 40 |
+
26,
|
| 41 |
+
27
|
| 42 |
+
],
|
| 43 |
+
"native_revision": "3d5953d4c51841828c7fa4650d80246cef1bca59",
|
| 44 |
+
"native_input_sha256": {
|
| 45 |
+
"document_assignments.jsonl": "e2e5b4833e0d6d42019ef3acb9e554126bfd0c0df4ef4648c414afab6493990c",
|
| 46 |
+
"sentence_assignments.jsonl": "f2739f428642ee1988642e336ccc2040905c7eb9fe67c47694f05fe40bcb91a2",
|
| 47 |
+
"record_assignments.jsonl": "921faa12016ef47c4f90761e75e6bc19c5df6220bb498c6b40cf652ef9d7df70",
|
| 48 |
+
"comment_assignments.jsonl": "643733ff582804b003ff0ad8479b611c7255913e78d4110894407d4a56f73eb0",
|
| 49 |
+
"video_text_assignments.jsonl": "b9c52a3261b231d8104799e1904bf6ace7f53e9e5f95ddf4cff418e3abfe0c24"
|
| 50 |
+
},
|
| 51 |
+
"classification": "Keep frozen native30 membership; filter to approved seven IDs. No reassignment of held/excluded/noise sentences. Record eligibility unchanged; original comment union of eligible retained sentence labels; distinct IDs with duplicate text remain separate.",
|
| 52 |
+
"measurement": "Same full36-v3 frequency formulas: all observed Jan-Aug non-known-author comments for pi; September in_S non-known-author comments for daily p; D=normalize(pi*p); S=normalized eligible within-video deduplicated ASR/OCR topic counts; M(v,t)=dot(S(v),D(t-1,-v)). Empty topic mass remains missing, no smoothing.",
|
| 53 |
+
"outcome_sha256": "4181ca2570272f9c2f7314c3978196b0f33cb544965af93a448748f67f8ddee5",
|
| 54 |
+
"old_joined_sha256": "7e78551a9739e728b3049a196c9012d6b25959b7a25e6606bf4c8cd54bef59bd",
|
| 55 |
+
"old_strict_result_sha256": "d68ddc98e24ac92cb78a3e11429c2a9e158f259ca23f543696c6c05055a28d9e",
|
| 56 |
+
"model": {
|
| 57 |
+
"id": "video_date_FE",
|
| 58 |
+
"date_FE": true,
|
| 59 |
+
"video_FE": true,
|
| 60 |
+
"match_terms": [
|
| 61 |
+
"match_within"
|
| 62 |
+
],
|
| 63 |
+
"controls": [
|
| 64 |
+
"log_age_within"
|
| 65 |
+
],
|
| 66 |
+
"reason": "Strict unpenalized video/date intercepts isolate within-video matching association; the invariant match mean is not separately estimable."
|
| 67 |
+
},
|
| 68 |
+
"optimization": {
|
| 69 |
+
"method": "L-BFGS-B",
|
| 70 |
+
"maxiter": 4000,
|
| 71 |
+
"maxls": 60,
|
| 72 |
+
"ftol": 1e-13,
|
| 73 |
+
"gtol": 1e-07,
|
| 74 |
+
"newton_refinements_max": 5,
|
| 75 |
+
"score_max_abs_acceptance": 0.0001,
|
| 76 |
+
"rank_tolerance": 1e-10,
|
| 77 |
+
"exact_redundant_nuisance_only": "Date FE entered first; never silently remove match terms; record any redundant nuisance columns."
|
| 78 |
+
},
|
| 79 |
+
"likelihood": "Unpenalized proportional-odds cumulative logit; exploratory FE model may have incidental-parameter bias. No assertion of random-effects/CRE equivalence.",
|
| 80 |
+
"inference": "Unpenalized individual scores and observed Hessian; creator/date two-way inclusion-exclusion sandwich with G/(G-1) per component; t df=min(clusters)-1; no covariance PSD repair, no target variance fallback.",
|
| 81 |
+
"sample": "Primary uses all new measurable rows of the unchanged 900-row calendar panel, retaining zero outcomes. Always report missingness. Auxiliary comparison uses intersection with old720; reuse fits when row sets are identical, otherwise refit unchanged strict spec only. At most3 fits, all reported.",
|
| 82 |
+
"primary": "native7_all",
|
| 83 |
+
"max_fits": 3,
|
| 84 |
+
"multiple_testing": "One predesignated new primary coefficient; common-sample replays are auxiliary, no outcome-based selection. All p values exploratory and unadjusted, not independent confirmation after prior research.",
|
| 85 |
+
"code_sha256": {
|
| 86 |
+
"build_buv_attention_measurement.py": "e8c26dcd08fbb38ed38042e2e7dd8e17d4e51ce36858bcc66fcda73d83644f65",
|
| 87 |
+
"build_buv_pilot_panel.py": "078682653932d836d2b41d5e4e16115f547ad205b9a22970b26ee0166ab2e9ce",
|
| 88 |
+
"build_buv_quick_text_trial.py": "4422db3e37198b4c141dbf968992766bc846845c1211f8cc908b33a0ea105960",
|
| 89 |
+
"build_buv_topic_diagnostic.py": "d2e3ad3acf0792c1563b633605bb67d036ef666cb9cd3b0ee48d8ad914ab7a2b",
|
| 90 |
+
"compare_buv_full36.py": "90893d6addb48f7f32b05dbb45c3b69829dae44529c0a08f6b896a87ea9b22a4",
|
| 91 |
+
"extract_preperiod_features.py": "6cc2d990ae7b16417b8f51cb90aba00447658c7d4077278a15d9ec45a001a83e",
|
| 92 |
+
"extract_preperiod_uie_features.py": "2586e35919a3fa49654f4bced0884749e7d325f5bf6cf0af8a3c12f80a65de40",
|
| 93 |
+
"fit_buv_quick_text_trial.py": "2771618ed8b2f983ffb89edd36b1c54632946c8397a8634b5d45129e877bcaf6",
|
| 94 |
+
"fit_buv_topic_diagnostic.py": "0bed6ace5a63adca066f2d5caa80e36a6aaa3c9af51e8649d0ed02c353d21fb8",
|
| 95 |
+
"infer_buv_full36.py": "71f8e915d8b7f68d4e5ece2cc89cc4d05a99b62e6a328c32032e00a238a28e69",
|
| 96 |
+
"prepare_preperiod_topics.py": "34c58eacd309cf816e89485f1c0b32550dc2e5aead5105efa25a013126cfce73",
|
| 97 |
+
"run_buv_full36.py": "37de01a564fe56fff486c70173bbb7bef249f65d03c29061fff7cdd9f247825a",
|
| 98 |
+
"run_buv_native7.py": "2fadc1efe9a23313188a382ae89a77b87ccb577adc69605385058f3ede91bf3a"
|
| 99 |
+
},
|
| 100 |
+
"seed_changes": false,
|
| 101 |
+
"random_draws": 0,
|
| 102 |
+
"new_clustering": false,
|
| 103 |
+
"new_sentence_inference": false,
|
| 104 |
+
"limits": [
|
| 105 |
+
"Model-assisted seven-topic screen is user approved, not human gold or sentence accuracy.",
|
| 106 |
+
"Native topic1 combines several effects and skin suitability; topic21 partly overlaps it across languages.",
|
| 107 |
+
"Zero demand/supply coordinates retained; seven topics need not supply seven informative match dimensions.",
|
| 108 |
+
"Native eligible-sentence unions and old manual mapping differ; comparison does not isolate only topic count.",
|
| 109 |
+
"Within-video match association under video/date effects; no causal identification, few clusters, incidental-parameter and generated-measurement uncertainty.",
|
| 110 |
+
"Current full-month discovery and prior outcome exposure make this exploratory; no search for significance."
|
| 111 |
+
]
|
| 112 |
+
}
|
supplements/20261030_buv_native7_measurement_regression/measurement_summary.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"status": "NATIVE7_MEASUREMENT_COMPLETE",
|
| 3 |
+
"topics": [
|
| 4 |
+
1,
|
| 5 |
+
11,
|
| 6 |
+
12,
|
| 7 |
+
14,
|
| 8 |
+
21,
|
| 9 |
+
28,
|
| 10 |
+
29
|
| 11 |
+
],
|
| 12 |
+
"documents": 45097,
|
| 13 |
+
"retained_documents": 9552,
|
| 14 |
+
"sentence_units": 88930,
|
| 15 |
+
"sentence_status_counts": [
|
| 16 |
+
{
|
| 17 |
+
"source": "comment",
|
| 18 |
+
"status": "excluded",
|
| 19 |
+
"count": 11322
|
| 20 |
+
},
|
| 21 |
+
{
|
| 22 |
+
"source": "comment",
|
| 23 |
+
"status": "mixed_held",
|
| 24 |
+
"count": 36677
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"source": "comment",
|
| 28 |
+
"status": "native_outlier",
|
| 29 |
+
"count": 17899
|
| 30 |
+
},
|
| 31 |
+
{
|
| 32 |
+
"source": "comment",
|
| 33 |
+
"status": "retained",
|
| 34 |
+
"count": 14434
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"source": "video",
|
| 38 |
+
"status": "excluded",
|
| 39 |
+
"count": 328
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"source": "video",
|
| 43 |
+
"status": "mixed_held",
|
| 44 |
+
"count": 3195
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"source": "video",
|
| 48 |
+
"status": "native_outlier",
|
| 49 |
+
"count": 1759
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
"source": "video",
|
| 53 |
+
"status": "retained",
|
| 54 |
+
"count": 3316
|
| 55 |
+
}
|
| 56 |
+
],
|
| 57 |
+
"comments": 46328,
|
| 58 |
+
"mapped_comments": 10365,
|
| 59 |
+
"multilabel_comments": 299,
|
| 60 |
+
"known_authors": 1040,
|
| 61 |
+
"preperiod_eligible": 32774,
|
| 62 |
+
"preperiod_mapped": 7044,
|
| 63 |
+
"september_eligible": 12510,
|
| 64 |
+
"september_mapped": 3321,
|
| 65 |
+
"supply_videos": 30,
|
| 66 |
+
"measurable_supply_videos": 28,
|
| 67 |
+
"unique_video_text_units": 1245,
|
| 68 |
+
"mapped_video_text_units": 553,
|
| 69 |
+
"mean_D": [
|
| 70 |
+
0.9960713989448983,
|
| 71 |
+
0.0035865835865176005,
|
| 72 |
+
0.00033210029696865084,
|
| 73 |
+
9.917171615482559e-06,
|
| 74 |
+
0.0,
|
| 75 |
+
0.0,
|
| 76 |
+
0.0
|
| 77 |
+
],
|
| 78 |
+
"duplicates_retained_by_ID": true,
|
| 79 |
+
"reassigned_excluded_sentences": 0,
|
| 80 |
+
"new_clustering_fits": 0,
|
| 81 |
+
"encoder_calls": 0,
|
| 82 |
+
"transform_calls": 0,
|
| 83 |
+
"UIE_used": false,
|
| 84 |
+
"outcomes_read": false,
|
| 85 |
+
"human_accuracy_validated": false,
|
| 86 |
+
"finished_at_utc": "2026-10-30T10:00:02.143374+00:00"
|
| 87 |
+
}
|
supplements/20261030_buv_native7_measurement_regression/native7_complete.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0c99b9b2fafe40550f941ccedbbda669f6b61267584d2025eaadb6363eba3a51
|
| 3 |
+
size 11521160
|
supplements/20261030_buv_native7_measurement_regression/regression_summary.json
ADDED
|
@@ -0,0 +1,724 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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+
"specification": {
|
| 7 |
+
"id": "video_date_FE",
|
| 8 |
+
"date_FE": true,
|
| 9 |
+
"video_FE": true,
|
| 10 |
+
"match_terms": [
|
| 11 |
+
"match_within"
|
| 12 |
+
],
|
| 13 |
+
"controls": [
|
| 14 |
+
"log_age_within"
|
| 15 |
+
],
|
| 16 |
+
"reason": "Strict unpenalized video/date intercepts isolate within-video matching association; the invariant match mean is not separately estimable."
|
| 17 |
+
},
|
| 18 |
+
"rows": 805,
|
| 19 |
+
"videos": 28,
|
| 20 |
+
"dates": 29,
|
| 21 |
+
"creators": 25,
|
| 22 |
+
"category_counts": [
|
| 23 |
+
367,
|
| 24 |
+
44,
|
| 25 |
+
55,
|
| 26 |
+
117,
|
| 27 |
+
92,
|
| 28 |
+
50,
|
| 29 |
+
67,
|
| 30 |
+
6,
|
| 31 |
+
5,
|
| 32 |
+
2,
|
| 33 |
+
0,
|
| 34 |
+
0,
|
| 35 |
+
0
|
| 36 |
+
],
|
| 37 |
+
"observed_categories": [
|
| 38 |
+
0,
|
| 39 |
+
1,
|
| 40 |
+
2,
|
| 41 |
+
3,
|
| 42 |
+
4,
|
| 43 |
+
5,
|
| 44 |
+
6,
|
| 45 |
+
7,
|
| 46 |
+
8,
|
| 47 |
+
9
|
| 48 |
+
],
|
| 49 |
+
"status": "ESTIMATED_EXPLORATORY",
|
| 50 |
+
"objective": 1158.6412322303472,
|
| 51 |
+
"beta": [
|
| 52 |
+
-0.35857912282049753,
|
| 53 |
+
-0.02717693687750406,
|
| 54 |
+
-0.4197420340463062,
|
| 55 |
+
-0.12026009917230562,
|
| 56 |
+
0.37688757304184967,
|
| 57 |
+
-0.9343500791747641,
|
| 58 |
+
0.2930927501698932,
|
| 59 |
+
-0.306684711274398,
|
| 60 |
+
0.13287528880179086,
|
| 61 |
+
-0.02392709338680939,
|
| 62 |
+
0.3738127670413494,
|
| 63 |
+
0.02343685189471098,
|
| 64 |
+
-0.5493005675098533,
|
| 65 |
+
0.4896562497246156,
|
| 66 |
+
0.3614688990680267,
|
| 67 |
+
0.36138103464008225,
|
| 68 |
+
0.24027951576726422,
|
| 69 |
+
0.3204497799962765,
|
| 70 |
+
0.0695851634540914,
|
| 71 |
+
-0.6855290098527972,
|
| 72 |
+
-0.151159294060369,
|
| 73 |
+
-0.01925945838043671,
|
| 74 |
+
-0.08695535378238921,
|
| 75 |
+
0.39504143693443283,
|
| 76 |
+
0.06868794763274222,
|
| 77 |
+
0.43038633397938125,
|
| 78 |
+
1.5700670529556455,
|
| 79 |
+
2.3880120698195753,
|
| 80 |
+
-0.13487773781876966,
|
| 81 |
+
0.6240774735291857,
|
| 82 |
+
0.6459802926068476,
|
| 83 |
+
2.788152446290775,
|
| 84 |
+
-0.5653810151575303,
|
| 85 |
+
0.8753704759777118,
|
| 86 |
+
-0.050704435792826144,
|
| 87 |
+
2.3894920533591497,
|
| 88 |
+
0.5387288483399109,
|
| 89 |
+
-1.1289868168749906,
|
| 90 |
+
-0.9462486825627734,
|
| 91 |
+
-0.3710507592073939,
|
| 92 |
+
-0.5596399168093446,
|
| 93 |
+
-4.3564645808627125,
|
| 94 |
+
-0.5328352156516829,
|
| 95 |
+
0.4847414790146645,
|
| 96 |
+
-2.617355680715959,
|
| 97 |
+
1.4206741519941166,
|
| 98 |
+
0.4120152301337382,
|
| 99 |
+
-1.1274862289023944,
|
| 100 |
+
-2.318471610786891,
|
| 101 |
+
3.652679432212287,
|
| 102 |
+
0.5058686979929345,
|
| 103 |
+
-0.19019451465365347,
|
| 104 |
+
-0.26423603194162615,
|
| 105 |
+
-2.4111174024432955,
|
| 106 |
+
-0.10552883605863622,
|
| 107 |
+
-0.137162744966001,
|
| 108 |
+
-0.032066237330053066
|
| 109 |
+
],
|
| 110 |
+
"theta": [
|
| 111 |
+
-0.207456857141756,
|
| 112 |
+
-1.1364113946679921,
|
| 113 |
+
-0.9237043406242088,
|
| 114 |
+
-0.08549871855363952,
|
| 115 |
+
-0.0033690820516665914,
|
| 116 |
+
-0.23725136625231039,
|
| 117 |
+
0.8549454297271801,
|
| 118 |
+
-0.3988897552591081,
|
| 119 |
+
0.26008634679972886
|
| 120 |
+
],
|
| 121 |
+
"optimizer": {
|
| 122 |
+
"success": true,
|
| 123 |
+
"message": "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH",
|
| 124 |
+
"iterations": 82,
|
| 125 |
+
"newton_refinements": [
|
| 126 |
+
{
|
| 127 |
+
"iteration": 0,
|
| 128 |
+
"fraction": 1.0,
|
| 129 |
+
"objective": 1158.6412322303472
|
| 130 |
+
}
|
| 131 |
+
]
|
| 132 |
+
},
|
| 133 |
+
"diagnostics": {
|
| 134 |
+
"max_abs_gradient": 7.537870327922747e-11,
|
| 135 |
+
"hessian_min_eigenvalue": 0.9788469720165416,
|
| 136 |
+
"hessian_condition_number": 332.6938581746793,
|
| 137 |
+
"finite_difference_max_error": 1.7782681993594451e-09,
|
| 138 |
+
"score_sum_max_error": 8.968846748565718e-15
|
| 139 |
+
},
|
| 140 |
+
"design": {
|
| 141 |
+
"scaling": {
|
| 142 |
+
"match_within": {
|
| 143 |
+
"mean": -9.448316870087342e-18,
|
| 144 |
+
"sd": 0.0012233579786528478
|
| 145 |
+
},
|
| 146 |
+
"log_age_within": {
|
| 147 |
+
"mean": -1.654990844161724e-17,
|
| 148 |
+
"sd": 0.43003082239190926
|
| 149 |
+
}
|
| 150 |
+
},
|
| 151 |
+
"exact_redundant_nuisance": [],
|
| 152 |
+
"design_rank": 58,
|
| 153 |
+
"design_condition_number": 13.8972866976847,
|
| 154 |
+
"videos": 28,
|
| 155 |
+
"dates": 29
|
| 156 |
+
},
|
| 157 |
+
"feature_names": [
|
| 158 |
+
"date_contrast_1",
|
| 159 |
+
"date_contrast_2",
|
| 160 |
+
"date_contrast_3",
|
| 161 |
+
"date_contrast_4",
|
| 162 |
+
"date_contrast_5",
|
| 163 |
+
"date_contrast_6",
|
| 164 |
+
"date_contrast_7",
|
| 165 |
+
"date_contrast_8",
|
| 166 |
+
"date_contrast_9",
|
| 167 |
+
"date_contrast_10",
|
| 168 |
+
"date_contrast_11",
|
| 169 |
+
"date_contrast_12",
|
| 170 |
+
"date_contrast_13",
|
| 171 |
+
"date_contrast_14",
|
| 172 |
+
"date_contrast_15",
|
| 173 |
+
"date_contrast_16",
|
| 174 |
+
"date_contrast_17",
|
| 175 |
+
"date_contrast_18",
|
| 176 |
+
"date_contrast_19",
|
| 177 |
+
"date_contrast_20",
|
| 178 |
+
"date_contrast_21",
|
| 179 |
+
"date_contrast_22",
|
| 180 |
+
"date_contrast_23",
|
| 181 |
+
"date_contrast_24",
|
| 182 |
+
"date_contrast_25",
|
| 183 |
+
"date_contrast_26",
|
| 184 |
+
"date_contrast_27",
|
| 185 |
+
"date_contrast_28",
|
| 186 |
+
"video_contrast_1",
|
| 187 |
+
"video_contrast_2",
|
| 188 |
+
"video_contrast_3",
|
| 189 |
+
"video_contrast_4",
|
| 190 |
+
"video_contrast_5",
|
| 191 |
+
"video_contrast_6",
|
| 192 |
+
"video_contrast_7",
|
| 193 |
+
"video_contrast_8",
|
| 194 |
+
"video_contrast_9",
|
| 195 |
+
"video_contrast_10",
|
| 196 |
+
"video_contrast_11",
|
| 197 |
+
"video_contrast_12",
|
| 198 |
+
"video_contrast_13",
|
| 199 |
+
"video_contrast_14",
|
| 200 |
+
"video_contrast_15",
|
| 201 |
+
"video_contrast_16",
|
| 202 |
+
"video_contrast_17",
|
| 203 |
+
"video_contrast_18",
|
| 204 |
+
"video_contrast_19",
|
| 205 |
+
"video_contrast_20",
|
| 206 |
+
"video_contrast_21",
|
| 207 |
+
"video_contrast_22",
|
| 208 |
+
"video_contrast_23",
|
| 209 |
+
"video_contrast_24",
|
| 210 |
+
"video_contrast_25",
|
| 211 |
+
"video_contrast_26",
|
| 212 |
+
"video_contrast_27",
|
| 213 |
+
"match_within",
|
| 214 |
+
"log_age_within"
|
| 215 |
+
],
|
| 216 |
+
"match_residual_variance_fraction": 4.04775450063096e-06,
|
| 217 |
+
"clusters": {
|
| 218 |
+
"first": 25,
|
| 219 |
+
"second": 29,
|
| 220 |
+
"intersection": 718,
|
| 221 |
+
"min_eigenvalue": -0.5496596492852474
|
| 222 |
+
},
|
| 223 |
+
"covariance_psd_repaired": false,
|
| 224 |
+
"test": {
|
| 225 |
+
"beta": -0.137162744966001,
|
| 226 |
+
"se": 0.20734870186283422,
|
| 227 |
+
"t": -0.6615076136658777,
|
| 228 |
+
"df": 24,
|
| 229 |
+
"p_two_sided": 0.5145882031123573,
|
| 230 |
+
"ci95": [
|
| 231 |
+
-0.5651094324961419,
|
| 232 |
+
0.2907839425641398
|
| 233 |
+
],
|
| 234 |
+
"odds_ratio": 0.8718283289141459,
|
| 235 |
+
"odds_ratio_ci95": [
|
| 236 |
+
0.5682979530910394,
|
| 237 |
+
1.3374755811859647
|
| 238 |
+
],
|
| 239 |
+
"beta_per_001": -1.1211987607833607,
|
| 240 |
+
"ci95_per_001": [
|
| 241 |
+
-4.619330092720987,
|
| 242 |
+
2.3769325711542653
|
| 243 |
+
],
|
| 244 |
+
"odds_ratio_per_001": 0.32588889754369776,
|
| 245 |
+
"odds_ratio_ci95_per_001": [
|
| 246 |
+
0.00985939873232908,
|
| 247 |
+
10.771810373588398
|
| 248 |
+
]
|
| 249 |
+
}
|
| 250 |
+
},
|
| 251 |
+
"native7_common": {
|
| 252 |
+
"model": "native7_common",
|
| 253 |
+
"specification": {
|
| 254 |
+
"id": "video_date_FE",
|
| 255 |
+
"date_FE": true,
|
| 256 |
+
"video_FE": true,
|
| 257 |
+
"match_terms": [
|
| 258 |
+
"match_within"
|
| 259 |
+
],
|
| 260 |
+
"controls": [
|
| 261 |
+
"log_age_within"
|
| 262 |
+
],
|
| 263 |
+
"reason": "Strict unpenalized video/date intercepts isolate within-video matching association; the invariant match mean is not separately estimable."
|
| 264 |
+
},
|
| 265 |
+
"rows": 720,
|
| 266 |
+
"videos": 25,
|
| 267 |
+
"dates": 29,
|
| 268 |
+
"creators": 22,
|
| 269 |
+
"category_counts": [
|
| 270 |
+
324,
|
| 271 |
+
37,
|
| 272 |
+
50,
|
| 273 |
+
114,
|
| 274 |
+
87,
|
| 275 |
+
41,
|
| 276 |
+
58,
|
| 277 |
+
4,
|
| 278 |
+
4,
|
| 279 |
+
1,
|
| 280 |
+
0,
|
| 281 |
+
0,
|
| 282 |
+
0
|
| 283 |
+
],
|
| 284 |
+
"observed_categories": [
|
| 285 |
+
0,
|
| 286 |
+
1,
|
| 287 |
+
2,
|
| 288 |
+
3,
|
| 289 |
+
4,
|
| 290 |
+
5,
|
| 291 |
+
6,
|
| 292 |
+
7,
|
| 293 |
+
8,
|
| 294 |
+
9
|
| 295 |
+
],
|
| 296 |
+
"status": "ESTIMATED_EXPLORATORY",
|
| 297 |
+
"objective": 1018.5261436519543,
|
| 298 |
+
"beta": [
|
| 299 |
+
-0.5678527875763253,
|
| 300 |
+
-0.48114401926313616,
|
| 301 |
+
-0.5133017569535613,
|
| 302 |
+
-0.22815070734650303,
|
| 303 |
+
0.5113782172133704,
|
| 304 |
+
-1.07521761109966,
|
| 305 |
+
0.6429836367902689,
|
| 306 |
+
-0.5627991484701037,
|
| 307 |
+
0.2940062964258286,
|
| 308 |
+
-0.15307710367400462,
|
| 309 |
+
0.030992581065302238,
|
| 310 |
+
-0.22980475590256524,
|
| 311 |
+
-0.274097408389487,
|
| 312 |
+
0.6591345551746637,
|
| 313 |
+
0.6282080386383326,
|
| 314 |
+
0.6791211493088142,
|
| 315 |
+
0.23874820316915807,
|
| 316 |
+
0.019161013900018387,
|
| 317 |
+
0.14520972032383844,
|
| 318 |
+
-0.439044838815606,
|
| 319 |
+
-0.2723024952405358,
|
| 320 |
+
0.1143078630927534,
|
| 321 |
+
-0.10817600037930655,
|
| 322 |
+
0.053668681323361694,
|
| 323 |
+
0.2873527791282798,
|
| 324 |
+
0.6648805205092947,
|
| 325 |
+
1.66672489206319,
|
| 326 |
+
2.556357074200812,
|
| 327 |
+
-0.11128270754034963,
|
| 328 |
+
0.7011307045859427,
|
| 329 |
+
0.6886696231408543,
|
| 330 |
+
2.8384340871222236,
|
| 331 |
+
-0.5615617988751653,
|
| 332 |
+
0.8920680694563465,
|
| 333 |
+
-0.029548163773037497,
|
| 334 |
+
2.3985501375777285,
|
| 335 |
+
-1.1221851111831733,
|
| 336 |
+
-0.8718314914988082,
|
| 337 |
+
-0.28762974078282977,
|
| 338 |
+
-0.49147802426323883,
|
| 339 |
+
-4.525712801179064,
|
| 340 |
+
-0.44492905382674236,
|
| 341 |
+
0.5873169486588594,
|
| 342 |
+
-2.639395489346567,
|
| 343 |
+
1.5073643600421947,
|
| 344 |
+
0.48694289130609275,
|
| 345 |
+
-1.0795098991283574,
|
| 346 |
+
-2.354720347000573,
|
| 347 |
+
3.7458262664619983,
|
| 348 |
+
-0.05990972558347865,
|
| 349 |
+
-0.1834895473186544,
|
| 350 |
+
-0.07221284040786016,
|
| 351 |
+
0.11013943331424106,
|
| 352 |
+
0.08945174759337621
|
| 353 |
+
],
|
| 354 |
+
"theta": [
|
| 355 |
+
-0.23865401021818847,
|
| 356 |
+
-1.1903260804188986,
|
| 357 |
+
-0.9044518000115249,
|
| 358 |
+
0.00449807874202696,
|
| 359 |
+
0.10603897308525728,
|
| 360 |
+
-0.22874635212223993,
|
| 361 |
+
0.9681816917722578,
|
| 362 |
+
-0.4634898716190127,
|
| 363 |
+
0.5059388117507773
|
| 364 |
+
],
|
| 365 |
+
"optimizer": {
|
| 366 |
+
"success": true,
|
| 367 |
+
"message": "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH",
|
| 368 |
+
"iterations": 83,
|
| 369 |
+
"newton_refinements": [
|
| 370 |
+
{
|
| 371 |
+
"iteration": 0,
|
| 372 |
+
"fraction": 1.0,
|
| 373 |
+
"objective": 1018.5261436519543
|
| 374 |
+
}
|
| 375 |
+
]
|
| 376 |
+
},
|
| 377 |
+
"diagnostics": {
|
| 378 |
+
"max_abs_gradient": 1.0937647155357889e-10,
|
| 379 |
+
"hessian_min_eigenvalue": 0.9550034183999369,
|
| 380 |
+
"hessian_condition_number": 318.4135341413671,
|
| 381 |
+
"finite_difference_max_error": 1.5816539189472678e-09,
|
| 382 |
+
"score_sum_max_error": 9.805228627652281e-15
|
| 383 |
+
},
|
| 384 |
+
"design": {
|
| 385 |
+
"scaling": {
|
| 386 |
+
"match_within": {
|
| 387 |
+
"mean": -1.518846776744138e-17,
|
| 388 |
+
"sd": 0.001172653701787965
|
| 389 |
+
},
|
| 390 |
+
"log_age_within": {
|
| 391 |
+
"mean": -2.7138785046392715e-17,
|
| 392 |
+
"sd": 0.40241933918837475
|
| 393 |
+
}
|
| 394 |
+
},
|
| 395 |
+
"exact_redundant_nuisance": [],
|
| 396 |
+
"design_rank": 55,
|
| 397 |
+
"design_condition_number": 15.987968407556338,
|
| 398 |
+
"videos": 25,
|
| 399 |
+
"dates": 29
|
| 400 |
+
},
|
| 401 |
+
"feature_names": [
|
| 402 |
+
"date_contrast_1",
|
| 403 |
+
"date_contrast_2",
|
| 404 |
+
"date_contrast_3",
|
| 405 |
+
"date_contrast_4",
|
| 406 |
+
"date_contrast_5",
|
| 407 |
+
"date_contrast_6",
|
| 408 |
+
"date_contrast_7",
|
| 409 |
+
"date_contrast_8",
|
| 410 |
+
"date_contrast_9",
|
| 411 |
+
"date_contrast_10",
|
| 412 |
+
"date_contrast_11",
|
| 413 |
+
"date_contrast_12",
|
| 414 |
+
"date_contrast_13",
|
| 415 |
+
"date_contrast_14",
|
| 416 |
+
"date_contrast_15",
|
| 417 |
+
"date_contrast_16",
|
| 418 |
+
"date_contrast_17",
|
| 419 |
+
"date_contrast_18",
|
| 420 |
+
"date_contrast_19",
|
| 421 |
+
"date_contrast_20",
|
| 422 |
+
"date_contrast_21",
|
| 423 |
+
"date_contrast_22",
|
| 424 |
+
"date_contrast_23",
|
| 425 |
+
"date_contrast_24",
|
| 426 |
+
"date_contrast_25",
|
| 427 |
+
"date_contrast_26",
|
| 428 |
+
"date_contrast_27",
|
| 429 |
+
"date_contrast_28",
|
| 430 |
+
"video_contrast_1",
|
| 431 |
+
"video_contrast_2",
|
| 432 |
+
"video_contrast_3",
|
| 433 |
+
"video_contrast_4",
|
| 434 |
+
"video_contrast_5",
|
| 435 |
+
"video_contrast_6",
|
| 436 |
+
"video_contrast_7",
|
| 437 |
+
"video_contrast_8",
|
| 438 |
+
"video_contrast_9",
|
| 439 |
+
"video_contrast_10",
|
| 440 |
+
"video_contrast_11",
|
| 441 |
+
"video_contrast_12",
|
| 442 |
+
"video_contrast_13",
|
| 443 |
+
"video_contrast_14",
|
| 444 |
+
"video_contrast_15",
|
| 445 |
+
"video_contrast_16",
|
| 446 |
+
"video_contrast_17",
|
| 447 |
+
"video_contrast_18",
|
| 448 |
+
"video_contrast_19",
|
| 449 |
+
"video_contrast_20",
|
| 450 |
+
"video_contrast_21",
|
| 451 |
+
"video_contrast_22",
|
| 452 |
+
"video_contrast_23",
|
| 453 |
+
"video_contrast_24",
|
| 454 |
+
"match_within",
|
| 455 |
+
"log_age_within"
|
| 456 |
+
],
|
| 457 |
+
"match_residual_variance_fraction": 3.688380615959409e-06,
|
| 458 |
+
"clusters": {
|
| 459 |
+
"first": 22,
|
| 460 |
+
"second": 29,
|
| 461 |
+
"intersection": 633,
|
| 462 |
+
"min_eigenvalue": -0.5359117541956874
|
| 463 |
+
},
|
| 464 |
+
"covariance_psd_repaired": false,
|
| 465 |
+
"test": {
|
| 466 |
+
"beta": 0.11013943331424106,
|
| 467 |
+
"se": 0.1356835589826715,
|
| 468 |
+
"t": 0.8117375026130266,
|
| 469 |
+
"df": 21,
|
| 470 |
+
"p_two_sided": 0.4260480845128519,
|
| 471 |
+
"ci95": [
|
| 472 |
+
-0.172029974448045,
|
| 473 |
+
0.3923088410765271
|
| 474 |
+
],
|
| 475 |
+
"odds_ratio": 1.1164337276614977,
|
| 476 |
+
"odds_ratio_ci95": [
|
| 477 |
+
0.8419539356857605,
|
| 478 |
+
1.4803948475458466
|
| 479 |
+
],
|
| 480 |
+
"beta_per_001": 0.9392323850281596,
|
| 481 |
+
"ci95_per_001": [
|
| 482 |
+
-1.4670142957443273,
|
| 483 |
+
3.3454790658006464
|
| 484 |
+
],
|
| 485 |
+
"odds_ratio_per_001": 2.558017092284423,
|
| 486 |
+
"odds_ratio_ci95_per_001": [
|
| 487 |
+
0.23061300053434922,
|
| 488 |
+
28.374165503495217
|
| 489 |
+
]
|
| 490 |
+
}
|
| 491 |
+
},
|
| 492 |
+
"full36_common": {
|
| 493 |
+
"reused_frozen_old_fit": true,
|
| 494 |
+
"source_sha256": "d68ddc98e24ac92cb78a3e11429c2a9e158f259ca23f543696c6c05055a28d9e",
|
| 495 |
+
"result": {
|
| 496 |
+
"model": "video_date_FE",
|
| 497 |
+
"specification": {
|
| 498 |
+
"id": "video_date_FE",
|
| 499 |
+
"date_FE": true,
|
| 500 |
+
"video_FE": true,
|
| 501 |
+
"match_terms": [
|
| 502 |
+
"match_within"
|
| 503 |
+
],
|
| 504 |
+
"controls": [
|
| 505 |
+
"log_age_within"
|
| 506 |
+
],
|
| 507 |
+
"reason": "Strict unpenalized video/date intercepts isolate within-video matching association; the invariant match mean is not separately estimable."
|
| 508 |
+
},
|
| 509 |
+
"status": "ESTIMATED_EXPLORATORY",
|
| 510 |
+
"objective": 1018.6800331691347,
|
| 511 |
+
"beta": [
|
| 512 |
+
-0.5095710616735619,
|
| 513 |
+
-0.4077927418718593,
|
| 514 |
+
-0.5652559253046935,
|
| 515 |
+
-0.216904913899982,
|
| 516 |
+
0.4991814847737419,
|
| 517 |
+
-0.9874431548298964,
|
| 518 |
+
0.6395040374963392,
|
| 519 |
+
-0.4228498883039066,
|
| 520 |
+
0.1941027861256803,
|
| 521 |
+
-0.05677927848089335,
|
| 522 |
+
0.24205834593582504,
|
| 523 |
+
-0.1327247847374678,
|
| 524 |
+
-0.39309400457398824,
|
| 525 |
+
0.6459540529420796,
|
| 526 |
+
0.5817414594639077,
|
| 527 |
+
0.5916898205993487,
|
| 528 |
+
0.23162423325807302,
|
| 529 |
+
0.13312256635021155,
|
| 530 |
+
0.06676445872140935,
|
| 531 |
+
-0.6355822929335448,
|
| 532 |
+
-0.26266930253081,
|
| 533 |
+
-0.017413688001933242,
|
| 534 |
+
-0.18239670661431898,
|
| 535 |
+
0.1569197120240647,
|
| 536 |
+
0.11146299941450376,
|
| 537 |
+
0.5358651319540179,
|
| 538 |
+
1.5752243251263807,
|
| 539 |
+
2.4351653127960153,
|
| 540 |
+
-0.11301764515049507,
|
| 541 |
+
0.6987645994425302,
|
| 542 |
+
0.6884906539772645,
|
| 543 |
+
2.83709455489564,
|
| 544 |
+
-0.5668912037989123,
|
| 545 |
+
0.8949610306187679,
|
| 546 |
+
-0.02920337150810774,
|
| 547 |
+
2.4035473769108395,
|
| 548 |
+
-1.1140048573215262,
|
| 549 |
+
-0.8740414961689703,
|
| 550 |
+
-0.28878664221339106,
|
| 551 |
+
-0.4951249338852465,
|
| 552 |
+
-4.529265606440673,
|
| 553 |
+
-0.44324742213210905,
|
| 554 |
+
0.5914366604427301,
|
| 555 |
+
-2.647418505882855,
|
| 556 |
+
1.4976630767597596,
|
| 557 |
+
0.48703386909190266,
|
| 558 |
+
-1.0792249802887257,
|
| 559 |
+
-2.3560453975767164,
|
| 560 |
+
3.7483387661129126,
|
| 561 |
+
-0.061386971052863455,
|
| 562 |
+
-0.18519110097521796,
|
| 563 |
+
-0.07488986966148137,
|
| 564 |
+
0.019919392506716604,
|
| 565 |
+
0.0849675525383897
|
| 566 |
+
],
|
| 567 |
+
"theta": [
|
| 568 |
+
-0.23828138928022283,
|
| 569 |
+
-1.1891508764132306,
|
| 570 |
+
-0.9036988425526336,
|
| 571 |
+
0.004466584006007289,
|
| 572 |
+
0.10497854273208526,
|
| 573 |
+
-0.22952608690371928,
|
| 574 |
+
0.9664843078214295,
|
| 575 |
+
-0.4652263700292758,
|
| 576 |
+
0.5044822518665604
|
| 577 |
+
],
|
| 578 |
+
"optimizer": {
|
| 579 |
+
"success": true,
|
| 580 |
+
"message": "CONVERGENCE: RELATIVE REDUCTION OF F <= FACTR*EPSMCH",
|
| 581 |
+
"iterations": 83,
|
| 582 |
+
"newton_refinements": [
|
| 583 |
+
{
|
| 584 |
+
"iteration": 0,
|
| 585 |
+
"fraction": 1.0,
|
| 586 |
+
"objective": 1018.6800331691347
|
| 587 |
+
}
|
| 588 |
+
]
|
| 589 |
+
},
|
| 590 |
+
"diagnostics": {
|
| 591 |
+
"max_abs_gradient": 6.263670138118016e-11,
|
| 592 |
+
"hessian_min_eigenvalue": 0.9828303552761095,
|
| 593 |
+
"hessian_condition_number": 308.9651329482248,
|
| 594 |
+
"finite_difference_max_error": 3.1483509133067855e-09,
|
| 595 |
+
"score_sum_max_error": 5.44579852715619e-15
|
| 596 |
+
},
|
| 597 |
+
"design": {
|
| 598 |
+
"scaling": {
|
| 599 |
+
"match_within": {
|
| 600 |
+
"mean": 2.5828105086765795e-18,
|
| 601 |
+
"sd": 0.012799490167999238
|
| 602 |
+
},
|
| 603 |
+
"log_age_within": {
|
| 604 |
+
"mean": -3.26899001695185e-17,
|
| 605 |
+
"sd": 0.40241933918837475
|
| 606 |
+
}
|
| 607 |
+
},
|
| 608 |
+
"exact_redundant_nuisance": [],
|
| 609 |
+
"design_rank": 55,
|
| 610 |
+
"design_condition_number": 10.370013849049947,
|
| 611 |
+
"videos": 25,
|
| 612 |
+
"dates": 29
|
| 613 |
+
},
|
| 614 |
+
"feature_names": [
|
| 615 |
+
"date_contrast_1",
|
| 616 |
+
"date_contrast_2",
|
| 617 |
+
"date_contrast_3",
|
| 618 |
+
"date_contrast_4",
|
| 619 |
+
"date_contrast_5",
|
| 620 |
+
"date_contrast_6",
|
| 621 |
+
"date_contrast_7",
|
| 622 |
+
"date_contrast_8",
|
| 623 |
+
"date_contrast_9",
|
| 624 |
+
"date_contrast_10",
|
| 625 |
+
"date_contrast_11",
|
| 626 |
+
"date_contrast_12",
|
| 627 |
+
"date_contrast_13",
|
| 628 |
+
"date_contrast_14",
|
| 629 |
+
"date_contrast_15",
|
| 630 |
+
"date_contrast_16",
|
| 631 |
+
"date_contrast_17",
|
| 632 |
+
"date_contrast_18",
|
| 633 |
+
"date_contrast_19",
|
| 634 |
+
"date_contrast_20",
|
| 635 |
+
"date_contrast_21",
|
| 636 |
+
"date_contrast_22",
|
| 637 |
+
"date_contrast_23",
|
| 638 |
+
"date_contrast_24",
|
| 639 |
+
"date_contrast_25",
|
| 640 |
+
"date_contrast_26",
|
| 641 |
+
"date_contrast_27",
|
| 642 |
+
"date_contrast_28",
|
| 643 |
+
"video_contrast_1",
|
| 644 |
+
"video_contrast_2",
|
| 645 |
+
"video_contrast_3",
|
| 646 |
+
"video_contrast_4",
|
| 647 |
+
"video_contrast_5",
|
| 648 |
+
"video_contrast_6",
|
| 649 |
+
"video_contrast_7",
|
| 650 |
+
"video_contrast_8",
|
| 651 |
+
"video_contrast_9",
|
| 652 |
+
"video_contrast_10",
|
| 653 |
+
"video_contrast_11",
|
| 654 |
+
"video_contrast_12",
|
| 655 |
+
"video_contrast_13",
|
| 656 |
+
"video_contrast_14",
|
| 657 |
+
"video_contrast_15",
|
| 658 |
+
"video_contrast_16",
|
| 659 |
+
"video_contrast_17",
|
| 660 |
+
"video_contrast_18",
|
| 661 |
+
"video_contrast_19",
|
| 662 |
+
"video_contrast_20",
|
| 663 |
+
"video_contrast_21",
|
| 664 |
+
"video_contrast_22",
|
| 665 |
+
"video_contrast_23",
|
| 666 |
+
"video_contrast_24",
|
| 667 |
+
"match_within",
|
| 668 |
+
"log_age_within"
|
| 669 |
+
],
|
| 670 |
+
"clusters": {
|
| 671 |
+
"first": 22,
|
| 672 |
+
"second": 29,
|
| 673 |
+
"intersection": 633,
|
| 674 |
+
"min_eigenvalue": -0.5316579021522824
|
| 675 |
+
},
|
| 676 |
+
"covariance_psd_repaired": false,
|
| 677 |
+
"seconds": 1.2596783638000488,
|
| 678 |
+
"tests": [
|
| 679 |
+
{
|
| 680 |
+
"model": "video_date_FE",
|
| 681 |
+
"term": "match_within",
|
| 682 |
+
"status": "ESTIMATED_EXPLORATORY",
|
| 683 |
+
"beta": 0.019919392506716604,
|
| 684 |
+
"se": 0.09448596264184926,
|
| 685 |
+
"t": 0.21081853801099978,
|
| 686 |
+
"df": 21,
|
| 687 |
+
"p_two_sided": 0.8350611310172645,
|
| 688 |
+
"ci95": [
|
| 689 |
+
-0.17657492353569382,
|
| 690 |
+
0.216413708549127
|
| 691 |
+
],
|
| 692 |
+
"odds_ratio": 1.0201191074684166,
|
| 693 |
+
"odds_ratio_ci95": [
|
| 694 |
+
0.8381359806916067,
|
| 695 |
+
1.2416159398901465
|
| 696 |
+
],
|
| 697 |
+
"raw_component_sd": 0.012799490167999238,
|
| 698 |
+
"beta_per_001": 0.015562645265760861,
|
| 699 |
+
"ci95_per_001": [
|
| 700 |
+
-0.1379546538323528,
|
| 701 |
+
0.16907994436387452
|
| 702 |
+
],
|
| 703 |
+
"odds_ratio_per_001": 1.0156843738828927,
|
| 704 |
+
"odds_ratio_ci95_per_001": [
|
| 705 |
+
0.8711381936287342,
|
| 706 |
+
1.1842148064392435
|
| 707 |
+
]
|
| 708 |
+
}
|
| 709 |
+
]
|
| 710 |
+
}
|
| 711 |
+
}
|
| 712 |
+
},
|
| 713 |
+
"fits_executed": 2,
|
| 714 |
+
"new_rows": 805,
|
| 715 |
+
"old_rows": 720,
|
| 716 |
+
"common_rows": 720,
|
| 717 |
+
"max_fits": 3,
|
| 718 |
+
"primary": "native7_all",
|
| 719 |
+
"comparisons_auxiliary_only": true,
|
| 720 |
+
"seed_changes": false,
|
| 721 |
+
"independent_confirmation": false,
|
| 722 |
+
"causal_identification": false,
|
| 723 |
+
"finished_at_utc": "2026-10-30T10:00:13.732181+00:00"
|
| 724 |
+
}
|
supplements/20261030_buv_native7_measurement_regression/retrieval_receipt.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"status": "CLOUD_COMPLETION_HASHES_VERIFIED",
|
| 3 |
+
"files_verified": 24,
|
| 4 |
+
"archive_sha256": "0c99b9b2fafe40550f941ccedbbda669f6b61267584d2025eaadb6363eba3a51",
|
| 5 |
+
"archive_bytes": 11521160,
|
| 6 |
+
"local_status": "LOCAL_ARCHIVE_AND_ALL_COMPLETION_FILES_MATCH",
|
| 7 |
+
"files_verified_locally": 24
|
| 8 |
+
}
|
supplements/20261030_buv_native7_measurement_regression/run_buv_native7.py
ADDED
|
@@ -0,0 +1,324 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Apply the user-approved seven-topic screen to frozen native BERTopic labels.
|
| 2 |
+
|
| 3 |
+
No encoder, clustering, transform, keyword mapper, or random draws. Scientific
|
| 4 |
+
execution stays on the dedicated AutoDL; synthetic unit tests may run locally.
|
| 5 |
+
"""
|
| 6 |
+
import argparse
|
| 7 |
+
from collections import Counter, defaultdict
|
| 8 |
+
from datetime import date, datetime, timedelta, timezone
|
| 9 |
+
import json
|
| 10 |
+
import math
|
| 11 |
+
from pathlib import Path
|
| 12 |
+
import time
|
| 13 |
+
|
| 14 |
+
from run_buv_full36 import aggregate, digest, distribution, require_cloud, rows, save, save_rows
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
def screen(topic, plan):
|
| 18 |
+
if topic == -1:
|
| 19 |
+
return 'native_outlier'
|
| 20 |
+
for key, status in (('retained', 'retained'), ('held', 'mixed_held'), ('excluded', 'excluded')):
|
| 21 |
+
if topic in plan[key]:
|
| 22 |
+
return status
|
| 23 |
+
raise ValueError('Topic outside frozen native30: ' + str(topic))
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
def selected(topics, plan):
|
| 27 |
+
return sorted({t for t in topics if screen(t, plan) == 'retained'})
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
def validate_plan(plan):
|
| 31 |
+
groups = [plan[k] for k in ('retained', 'held', 'excluded')]
|
| 32 |
+
if sorted(sum(groups, [])) != list(range(30)):
|
| 33 |
+
raise ValueError('Screen must partition all thirty topics exactly once')
|
| 34 |
+
if groups[0] != [1, 11, 12, 14, 21, 28, 29]:
|
| 35 |
+
raise ValueError('User-approved seven topics changed')
|
| 36 |
+
spec = plan['model']
|
| 37 |
+
if (not spec['date_FE'] or not spec['video_FE'] or spec['match_terms'] != ['match_within']
|
| 38 |
+
or spec['controls'] != ['log_age_within']):
|
| 39 |
+
raise ValueError('Frozen regression specification changed')
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
def filtered_row(row, plan):
|
| 43 |
+
status = screen(row['topic'], plan)
|
| 44 |
+
return dict(row, native_topic=row['topic'], screen_status=status,
|
| 45 |
+
retained_topic=row['topic'] if status == 'retained' else None)
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
def measure(native, plan, out):
|
| 49 |
+
require_cloud()
|
| 50 |
+
validate_plan(plan)
|
| 51 |
+
if out.exists():
|
| 52 |
+
raise ValueError('Never overwrite measurement evidence')
|
| 53 |
+
for name, expected in plan['native_input_sha256'].items():
|
| 54 |
+
if digest(native / name) != expected:
|
| 55 |
+
raise ValueError('Frozen native input changed: ' + name)
|
| 56 |
+
out.mkdir(parents=True)
|
| 57 |
+
save(out / 'plan.json', plan)
|
| 58 |
+
docs = {r['doc_id']: r for r in rows(native / 'document_assignments.jsonl')}
|
| 59 |
+
if len(docs) != 45097:
|
| 60 |
+
raise ValueError('Full unique corpus changed')
|
| 61 |
+
save_rows(out / 'document_mapping.jsonl', (filtered_row(r, plan) for r in docs.values()))
|
| 62 |
+
record_topics = defaultdict(set)
|
| 63 |
+
units_seen = set()
|
| 64 |
+
sentence_counts = Counter()
|
| 65 |
+
|
| 66 |
+
def sentences():
|
| 67 |
+
for row in rows(native / 'sentence_assignments.jsonl'):
|
| 68 |
+
if row['unit_id'] in units_seen or row['topic'] != docs[row['doc_id']]['topic']:
|
| 69 |
+
raise ValueError('Native sentence/document identity mismatch')
|
| 70 |
+
units_seen.add(row['unit_id'])
|
| 71 |
+
result = filtered_row(row, plan)
|
| 72 |
+
result['eligible_retained_topic'] = result['retained_topic'] if row['discovery_eligible'] else None
|
| 73 |
+
if result['eligible_retained_topic'] is not None:
|
| 74 |
+
record_topics[row['record_key']].add(row['topic'])
|
| 75 |
+
sentence_counts[(row['source'], result['screen_status'])] += 1
|
| 76 |
+
yield result
|
| 77 |
+
|
| 78 |
+
save_rows(out / 'sentence_mapping.jsonl', sentences())
|
| 79 |
+
if len(units_seen) != 88930:
|
| 80 |
+
raise ValueError('Sentence corpus changed')
|
| 81 |
+
records = []
|
| 82 |
+
record_ids = set()
|
| 83 |
+
for row in rows(native / 'record_assignments.jsonl'):
|
| 84 |
+
if row['record_key'] in record_ids:
|
| 85 |
+
raise ValueError('Duplicate original record ID')
|
| 86 |
+
record_ids.add(row['record_key'])
|
| 87 |
+
topics = selected(row['topics'], plan)
|
| 88 |
+
if topics != sorted(record_topics[row['record_key']]):
|
| 89 |
+
raise ValueError('Eligible sentence union differs from native record labels')
|
| 90 |
+
records.append(dict(row, native_topics=row['topics'], topics=topics,
|
| 91 |
+
status='mapped' if topics else 'no_retained_eligible_topic',
|
| 92 |
+
comment_count_weight=1 if row['source'] == 'comment' else None,
|
| 93 |
+
demand_eligible=row.get('is_source_author') is not True))
|
| 94 |
+
if len(records) != 54617:
|
| 95 |
+
raise ValueError('Original record scope changed')
|
| 96 |
+
save_rows(out / 'record_mapping.jsonl', records)
|
| 97 |
+
comments = [r for r in records if r['source'] == 'comment']
|
| 98 |
+
original_comments = list(rows(native / 'comment_assignments.jsonl'))
|
| 99 |
+
if ([r['record_key'] for r in comments] != [r['record_key'] for r in original_comments]
|
| 100 |
+
or len(comments) != 46328):
|
| 101 |
+
raise ValueError('Comment ID order/scope changed')
|
| 102 |
+
save_rows(out / 'comment_mapping.jsonl', comments)
|
| 103 |
+
videos = sorted({r['video_id'] for r in records if r['source'] == 'video'})
|
| 104 |
+
video_text = []
|
| 105 |
+
for row in rows(native / 'video_text_assignments.jsonl'):
|
| 106 |
+
if row['topic'] != docs[row['doc_id']]['topic']:
|
| 107 |
+
raise ValueError('Native video label mismatch')
|
| 108 |
+
video_text.append(dict(filtered_row(row, plan), topics=selected([row['topic']], plan)))
|
| 109 |
+
if len(videos) != 30 or len(video_text) != 1245:
|
| 110 |
+
raise ValueError('Frozen eligible video text scope changed')
|
| 111 |
+
save_rows(out / 'video_text_mapping.jsonl', video_text)
|
| 112 |
+
coordinates = plan['retained']
|
| 113 |
+
save(out / 'coordinates.json', coordinates)
|
| 114 |
+
pre = [r for r in comments if r['period'] == 'preperiod' and r['demand_eligible']]
|
| 115 |
+
sep = [r for r in comments if r['period'] == 'september' and r['in_S'] and r['demand_eligible']]
|
| 116 |
+
prior = aggregate(pre, coordinates)
|
| 117 |
+
pi = distribution(prior['q_K'])
|
| 118 |
+
if pi is None:
|
| 119 |
+
raise ValueError('No preperiod retained topic mass')
|
| 120 |
+
save(out / 'background_prior.json', dict(prior, pi_K=pi, coordinates=coordinates))
|
| 121 |
+
supply = []
|
| 122 |
+
for vid in videos:
|
| 123 |
+
counts = aggregate([r for r in video_text if r['video_id'] == vid], coordinates)
|
| 124 |
+
supply.append(dict(video_id=vid, **counts, S_K=distribution(counts['q_K'])))
|
| 125 |
+
save_rows(out / 'video_supply.jsonl', supply)
|
| 126 |
+
daily = []
|
| 127 |
+
for day in range(1, 31):
|
| 128 |
+
stamp = f'2026-09-{day:02d}'
|
| 129 |
+
same_day = [r for r in sep if r['created_at_beijing'][:10] == stamp]
|
| 130 |
+
for leave_out in ['ALL_S'] + videos:
|
| 131 |
+
counts = aggregate([r for r in same_day if r['video_id'] != leave_out], coordinates)
|
| 132 |
+
daily.append(dict(date=stamp, leave_out_video=leave_out, role_view='broad', **counts,
|
| 133 |
+
p_K=distribution(counts['q_K']), D_K=distribution(counts['q_K'], pi)))
|
| 134 |
+
save_rows(out / 'daily_attention.jsonl', daily)
|
| 135 |
+
lookup = {r['video_id']: r['S_K'] for r in supply}
|
| 136 |
+
matches = []
|
| 137 |
+
for d in daily:
|
| 138 |
+
if d['leave_out_video'] != 'ALL_S':
|
| 139 |
+
s, demand = lookup[d['leave_out_video']], d['D_K']
|
| 140 |
+
matches.append(dict(video_id=d['leave_out_video'], demand_date=d['date'],
|
| 141 |
+
match=sum(a*b for a, b in zip(s, demand)) if s is not None and demand is not None else None))
|
| 142 |
+
save_rows(out / 'match_series.jsonl', matches)
|
| 143 |
+
support = [dict(topic=t, prior_comments=prior['q_K'][k], pi=pi[k],
|
| 144 |
+
september_comments=sum(t in r['topics'] for r in sep),
|
| 145 |
+
supply_units=sum(t in r['topics'] for r in video_text),
|
| 146 |
+
supply_videos=sum(r['q_K'][k] > 0 for r in supply)) for k, t in enumerate(coordinates)]
|
| 147 |
+
save(out / 'topic_support.json', support)
|
| 148 |
+
global_days = [r for r in daily if r['leave_out_video'] == 'ALL_S']
|
| 149 |
+
report = dict(status='NATIVE7_MEASUREMENT_COMPLETE', topics=coordinates, documents=len(docs),
|
| 150 |
+
retained_documents=sum(r['topic'] in coordinates for r in docs.values()), sentence_units=len(units_seen),
|
| 151 |
+
sentence_status_counts=[dict(source=s, status=k, count=n) for (s, k), n in sorted(sentence_counts.items())],
|
| 152 |
+
comments=len(comments), mapped_comments=sum(bool(r['topics']) for r in comments),
|
| 153 |
+
multilabel_comments=sum(len(r['topics']) > 1 for r in comments),
|
| 154 |
+
known_authors=sum(r['is_source_author'] is True for r in comments),
|
| 155 |
+
preperiod_eligible=len(pre), preperiod_mapped=prior['hit_records'], september_eligible=len(sep),
|
| 156 |
+
september_mapped=sum(bool(r['topics']) for r in sep), supply_videos=len(videos),
|
| 157 |
+
measurable_supply_videos=sum(r['S_K'] is not None for r in supply),
|
| 158 |
+
unique_video_text_units=len(video_text), mapped_video_text_units=sum(bool(r['topics']) for r in video_text),
|
| 159 |
+
mean_D=[sum(r['D_K'][k] for r in global_days if r['D_K'] is not None) /
|
| 160 |
+
max(1, sum(r['D_K'] is not None for r in global_days)) for k in range(len(coordinates))],
|
| 161 |
+
duplicates_retained_by_ID=True, reassigned_excluded_sentences=0, new_clustering_fits=0,
|
| 162 |
+
encoder_calls=0, transform_calls=0, UIE_used=False, outcomes_read=False,
|
| 163 |
+
human_accuracy_validated=False, finished_at_utc=datetime.now(timezone.utc).isoformat())
|
| 164 |
+
save(out / 'summary.json', report)
|
| 165 |
+
save(out / 'measurement_manifest.json', dict(outcomes_read=False,
|
| 166 |
+
frozen_at_utc=datetime.now(timezone.utc).isoformat(),
|
| 167 |
+
files={p.name: digest(p) for p in sorted(out.iterdir()) if p.is_file()}))
|
| 168 |
+
print(json.dumps(report), flush=True)
|
| 169 |
+
|
| 170 |
+
|
| 171 |
+
def join_panel(panel, supply_rows, daily):
|
| 172 |
+
supply = {r['video_id']: r for r in supply_rows}
|
| 173 |
+
attention = {(r['leave_out_video'], r['date']): r for r in daily}
|
| 174 |
+
joined, excluded = [], []
|
| 175 |
+
for r in panel:
|
| 176 |
+
lag = (date.fromisoformat(r['date']) - timedelta(days=1)).isoformat()
|
| 177 |
+
s = supply[r['video_id']]['S_K']
|
| 178 |
+
g = attention.get(('ALL_S', lag))
|
| 179 |
+
d = attention.get((r['video_id'], lag))
|
| 180 |
+
reasons = []
|
| 181 |
+
if r['ordinal_display_category'] is None:
|
| 182 |
+
reasons.append('outcome_missing_or_not_published')
|
| 183 |
+
if s is None:
|
| 184 |
+
reasons.append('text_supply_unmeasurable')
|
| 185 |
+
if g is None or g['D_K'] is None:
|
| 186 |
+
reasons.append('lag_global_attention_missing')
|
| 187 |
+
if d is None or d['D_K'] is None:
|
| 188 |
+
reasons.append('lag_leave_video_out_attention_missing')
|
| 189 |
+
if reasons:
|
| 190 |
+
excluded.append(dict(video_id=r['video_id'], date=r['date'], reasons=reasons))
|
| 191 |
+
continue
|
| 192 |
+
joined.append(dict(video_id=r['video_id'], date=r['date'], creator_key=r['creator_key'],
|
| 193 |
+
y=r['ordinal_display_category'], log_age=math.log1p(r['age_calendar_days']),
|
| 194 |
+
history_rank_mean=0., history_observed_days=0,
|
| 195 |
+
history_placeholder_unused_in_strict_spec=True,
|
| 196 |
+
lag_date=lag, match=sum(a*b for a, b in zip(s, d['D_K']))))
|
| 197 |
+
return joined, excluded
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
def estimate(data, plan, out, label):
|
| 201 |
+
import numpy as np
|
| 202 |
+
from compare_buv_full36 import make_design, fit_model
|
| 203 |
+
from infer_buv_full36 import two_way_covariance, coefficient_test
|
| 204 |
+
result = dict(model=label, specification=plan['model'], rows=len(data),
|
| 205 |
+
videos=len({r['video_id'] for r in data}), dates=len({r['date'] for r in data}),
|
| 206 |
+
creators=len({r['creator_key'] for r in data}))
|
| 207 |
+
try:
|
| 208 |
+
original_y = np.array([r['y'] for r in data], dtype=int)
|
| 209 |
+
observed = np.unique(original_y)
|
| 210 |
+
y = np.searchsorted(observed, original_y)
|
| 211 |
+
result['category_counts'] = np.bincount(original_y, minlength=13).tolist()
|
| 212 |
+
result['observed_categories'] = observed.tolist()
|
| 213 |
+
X, names, design = make_design(data, plan['model'], plan['optimization']['rank_tolerance'])
|
| 214 |
+
fitted, H, scores, q = fit_model(X, y, plan)
|
| 215 |
+
result.update(fitted, design=design, feature_names=names)
|
| 216 |
+
j = names.index('match_within')
|
| 217 |
+
raw = np.array([r['match'] for r in data])
|
| 218 |
+
nuisance = np.column_stack([np.ones(len(data)), np.delete(X, j, axis=1)])
|
| 219 |
+
residual = raw - nuisance @ np.linalg.lstsq(nuisance, raw, rcond=None)[0]
|
| 220 |
+
result['match_residual_variance_fraction'] = float(np.var(residual) / np.var(raw))
|
| 221 |
+
arrays = dict(hessian=H, scores=scores, parameter_vector=q, design=X, outcome=y)
|
| 222 |
+
if fitted['status'] == 'ESTIMATED_EXPLORATORY':
|
| 223 |
+
cov, clusters = two_way_covariance(np.linalg.solve(H, np.eye(len(q))), scores,
|
| 224 |
+
[r['creator_key'] for r in data], [r['date'] for r in data])
|
| 225 |
+
result.update(clusters=clusters, covariance_psd_repaired=False)
|
| 226 |
+
arrays['covariance'] = cov
|
| 227 |
+
try:
|
| 228 |
+
test = coefficient_test(float(q[j]), float(cov[j, j]), min(clusters['first'], clusters['second']) - 1)
|
| 229 |
+
ratio = .01 / design['scaling']['match_within']['sd']
|
| 230 |
+
test.update(beta_per_001=float(q[j] * ratio),
|
| 231 |
+
ci95_per_001=[x*ratio for x in test['ci95']],
|
| 232 |
+
odds_ratio_per_001=float(np.exp(q[j]*ratio)),
|
| 233 |
+
odds_ratio_ci95_per_001=[float(np.exp(x*ratio)) for x in test['ci95']])
|
| 234 |
+
result['test'] = test
|
| 235 |
+
except ValueError as error:
|
| 236 |
+
result.update(status='TARGET_VARIANCE_UNRELIABLE', error=str(error))
|
| 237 |
+
np.savez_compressed(out / (label + '_numerical.npz'), **arrays)
|
| 238 |
+
except Exception as error:
|
| 239 |
+
result.update(status='NOT_ESTIMABLE', error=type(error).__name__ + ': ' + str(error))
|
| 240 |
+
save(out / (label + '.json'), result)
|
| 241 |
+
print(json.dumps(result), flush=True)
|
| 242 |
+
return result
|
| 243 |
+
|
| 244 |
+
|
| 245 |
+
def regress(measurement, panel_path, old_path, old_result_path, plan, out):
|
| 246 |
+
require_cloud()
|
| 247 |
+
if out.exists():
|
| 248 |
+
raise ValueError('Never overwrite regression evidence')
|
| 249 |
+
freeze = json.loads((measurement / 'measurement_manifest.json').read_text())
|
| 250 |
+
if freeze['outcomes_read'] or any(digest(measurement / k) != v for k, v in freeze['files'].items()):
|
| 251 |
+
raise ValueError('Measurement changed after freeze')
|
| 252 |
+
for p, expected in ((panel_path, plan['outcome_sha256']), (old_path, plan['old_joined_sha256']),
|
| 253 |
+
(old_result_path, plan['old_strict_result_sha256'])):
|
| 254 |
+
if digest(p) != expected:
|
| 255 |
+
raise ValueError('Frozen comparison source changed')
|
| 256 |
+
out.mkdir(parents=True)
|
| 257 |
+
save(out / 'analysis_manifest.json', dict(plan=plan,
|
| 258 |
+
measurement_manifest_sha256=digest(measurement / 'measurement_manifest.json'),
|
| 259 |
+
first_outcome_read_after_utc=datetime.now(timezone.utc).isoformat()))
|
| 260 |
+
panel = list(rows(panel_path))
|
| 261 |
+
if len(panel) != 900 or len({(r['video_id'], r['date']) for r in panel}) != 900:
|
| 262 |
+
raise ValueError('Frozen thirty-by-thirty outcome panel changed')
|
| 263 |
+
new, excluded = join_panel(panel, list(rows(measurement / 'video_supply.jsonl')),
|
| 264 |
+
list(rows(measurement / 'daily_attention.jsonl')))
|
| 265 |
+
save_rows(out / 'joined_panel.jsonl', new)
|
| 266 |
+
save_rows(out / 'excluded_calendar_rows.jsonl', excluded)
|
| 267 |
+
old = list(rows(old_path))
|
| 268 |
+
if len(old) != 720:
|
| 269 |
+
raise ValueError('Frozen old sample changed')
|
| 270 |
+
identity = lambda r: (r['video_id'], r['date'])
|
| 271 |
+
source = {identity(r): r for r in panel}
|
| 272 |
+
for r in old:
|
| 273 |
+
if r['y'] != source[identity(r)]['ordinal_display_category']:
|
| 274 |
+
raise ValueError('Old/new outcome mismatch')
|
| 275 |
+
r['creator_key'] = source[identity(r)]['creator_key']
|
| 276 |
+
new_keys, old_keys = {identity(r) for r in new}, {identity(r) for r in old}
|
| 277 |
+
common = new_keys & old_keys
|
| 278 |
+
save(out / 'sample_comparison.json', dict(new_rows=len(new), old_rows=len(old), common_rows=len(common),
|
| 279 |
+
new_only=sorted(new_keys-old_keys), old_only=sorted(old_keys-new_keys),
|
| 280 |
+
exclusion_reasons=dict(Counter(reason for r in excluded for reason in r['reasons']))))
|
| 281 |
+
results = {'native7_all': estimate(new, plan, out, 'native7_all')}
|
| 282 |
+
if common == new_keys:
|
| 283 |
+
results['native7_common'] = dict(reused='native7_all')
|
| 284 |
+
else:
|
| 285 |
+
results['native7_common'] = estimate([r for r in new if identity(r) in common], plan, out, 'native7_common')
|
| 286 |
+
if common == old_keys:
|
| 287 |
+
results['full36_common'] = dict(reused_frozen_old_fit=True,
|
| 288 |
+
source_sha256=digest(old_result_path), result=json.loads(old_result_path.read_text()))
|
| 289 |
+
else:
|
| 290 |
+
results['full36_common'] = estimate([r for r in old if identity(r) in common], plan, out, 'full36_common')
|
| 291 |
+
save(out / 'summary.json', dict(status='NATIVE7_FIXED_SPECIFICATION_FINISHED', models=results,
|
| 292 |
+
fits_executed=sum('reused' not in r and 'reused_frozen_old_fit' not in r for r in results.values()),
|
| 293 |
+
new_rows=len(new), old_rows=len(old), common_rows=len(common), max_fits=3,
|
| 294 |
+
primary='native7_all', comparisons_auxiliary_only=True, seed_changes=False,
|
| 295 |
+
independent_confirmation=False, causal_identification=False,
|
| 296 |
+
finished_at_utc=datetime.now(timezone.utc).isoformat()))
|
| 297 |
+
|
| 298 |
+
|
| 299 |
+
def main():
|
| 300 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 301 |
+
for name in ('native', 'plan', 'panel', 'old-joined', 'old-result', 'out'):
|
| 302 |
+
parser.add_argument('--' + name, type=Path, required=True)
|
| 303 |
+
args = parser.parse_args()
|
| 304 |
+
require_cloud()
|
| 305 |
+
plan = json.loads(args.plan.read_text())
|
| 306 |
+
validate_plan(plan)
|
| 307 |
+
if args.out.exists():
|
| 308 |
+
raise ValueError('Preserve the complete run, including failures')
|
| 309 |
+
args.out.mkdir(parents=True)
|
| 310 |
+
started = time.time()
|
| 311 |
+
save(args.out / 'execution.json', dict(status='STARTED', plan_sha256=digest(args.plan),
|
| 312 |
+
script_sha256=digest(__file__), started_at_utc=datetime.now(timezone.utc).isoformat()))
|
| 313 |
+
try:
|
| 314 |
+
measure(args.native, plan, args.out / 'measurement')
|
| 315 |
+
regress(args.out / 'measurement', args.panel, args.old_joined, args.old_result, plan, args.out / 'regression')
|
| 316 |
+
except Exception as error:
|
| 317 |
+
save(args.out / 'failure.json', dict(error=type(error).__name__ + ': ' + str(error)))
|
| 318 |
+
raise
|
| 319 |
+
save(args.out / 'completion.json', dict(status='COMPLETE', elapsed_seconds=time.time()-started,
|
| 320 |
+
files={str(p.relative_to(args.out)): digest(p) for p in sorted(args.out.rglob('*')) if p.is_file()}))
|
| 321 |
+
|
| 322 |
+
|
| 323 |
+
if __name__ == '__main__':
|
| 324 |
+
main()
|
supplements/20261030_buv_native7_measurement_regression/test_buv_native7.py
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Synthetic boundary checks; no real research data or model fits."""
|
| 2 |
+
import sys
|
| 3 |
+
import unittest
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
|
| 6 |
+
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
| 7 |
+
from run_buv_native7 import aggregate, distribution, filtered_row, join_panel, selected, validate_plan
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
def plan():
|
| 11 |
+
return dict(retained=[1, 11, 12, 14, 21, 28, 29], held=[0, 7, 9, 10, 13, 15, 16, 22, 24],
|
| 12 |
+
excluded=[2, 3, 4, 5, 6, 8, 17, 18, 19, 20, 23, 25, 26, 27],
|
| 13 |
+
model=dict(date_FE=True, video_FE=True, match_terms=['match_within'], controls=['log_age_within']))
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
class NativeSevenBoundaries(unittest.TestCase):
|
| 17 |
+
def test_screen_does_not_force_noise_or_discarded_into_an_attribute(self):
|
| 18 |
+
p = plan()
|
| 19 |
+
validate_plan(p)
|
| 20 |
+
for native, status in [(-1, 'native_outlier'), (0, 'mixed_held'), (2, 'excluded'), (11, 'retained')]:
|
| 21 |
+
source = dict(topic=native, text='same text regardless of rule keywords')
|
| 22 |
+
result = filtered_row(source, p)
|
| 23 |
+
self.assertEqual(result['topic'], native)
|
| 24 |
+
self.assertEqual(result['screen_status'], status)
|
| 25 |
+
self.assertEqual(result['retained_topic'], 11 if native == 11 else None)
|
| 26 |
+
self.assertEqual(source, dict(topic=native, text='same text regardless of rule keywords'))
|
| 27 |
+
self.assertEqual(selected([0, 11, 11, -1, 1, 2], p), [1, 11])
|
| 28 |
+
with self.assertRaises(ValueError):
|
| 29 |
+
filtered_row(dict(topic=30), p)
|
| 30 |
+
|
| 31 |
+
def test_distinct_comment_ids_with_identical_body_each_vote(self):
|
| 32 |
+
records = [dict(record_key=k, text='泡沫', video_id='v', topics=[11, 11, 1]) for k in ('a', 'b')]
|
| 33 |
+
counts = aggregate(records, [1, 11])
|
| 34 |
+
self.assertEqual(counts['q_K'], [2, 2])
|
| 35 |
+
self.assertEqual(counts['observed_records'], 2)
|
| 36 |
+
self.assertEqual(counts['hit_records'], 2)
|
| 37 |
+
self.assertEqual(distribution(counts['q_K'], [3/4, 1/4]), [3/4, 1/4])
|
| 38 |
+
self.assertIsNone(distribution([0, 0]))
|
| 39 |
+
self.assertIsNone(distribution([0, 2], [1, 0]))
|
| 40 |
+
|
| 41 |
+
def test_lag_and_leave_focal_video_out_and_true_zero_outcome(self):
|
| 42 |
+
panel = [dict(video_id='v', date='2026-09-02', creator_key='c',
|
| 43 |
+
ordinal_display_category=0, age_calendar_days=10)]
|
| 44 |
+
supply = [dict(video_id='v', S_K=[.75, .25])]
|
| 45 |
+
daily = [dict(date='2026-09-01', leave_out_video='ALL_S', D_K=[1., 0.]),
|
| 46 |
+
dict(date='2026-09-01', leave_out_video='v', D_K=[.2, .8]),
|
| 47 |
+
dict(date='2026-09-02', leave_out_video='v', D_K=[0., 1.])]
|
| 48 |
+
joined, excluded = join_panel(panel, supply, daily)
|
| 49 |
+
self.assertEqual(excluded, [])
|
| 50 |
+
self.assertEqual(joined[0]['y'], 0)
|
| 51 |
+
self.assertEqual(joined[0]['lag_date'], '2026-09-01')
|
| 52 |
+
self.assertAlmostEqual(joined[0]['match'], .35)
|
| 53 |
+
daily[1]['D_K'] = None
|
| 54 |
+
joined, excluded = join_panel(panel, supply, daily)
|
| 55 |
+
self.assertEqual(joined, [])
|
| 56 |
+
self.assertEqual(excluded[0]['reasons'], ['lag_leave_video_out_attention_missing'])
|
| 57 |
+
daily[1]['D_K'] = [1., 0.]
|
| 58 |
+
supply[0]['S_K'] = None
|
| 59 |
+
self.assertIn('text_supply_unmeasurable', join_panel(panel, supply, daily)[1][0]['reasons'])
|
| 60 |
+
|
| 61 |
+
def test_bad_partition_or_post_hoc_specification_is_rejected(self):
|
| 62 |
+
p = plan()
|
| 63 |
+
p['held'].append(1)
|
| 64 |
+
with self.assertRaises(ValueError):
|
| 65 |
+
validate_plan(p)
|
| 66 |
+
p = plan()
|
| 67 |
+
p['model']['video_FE'] = False
|
| 68 |
+
with self.assertRaises(ValueError):
|
| 69 |
+
validate_plan(p)
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
if __name__ == '__main__':
|
| 73 |
+
unittest.main()
|
supplements/20261030_buv_native7_measurement_regression/topic_support.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"topic": 1,
|
| 4 |
+
"prior_comments": 6698,
|
| 5 |
+
"pi": 0.9280864625190522,
|
| 6 |
+
"september_comments": 3153,
|
| 7 |
+
"supply_units": 338,
|
| 8 |
+
"supply_videos": 26
|
| 9 |
+
},
|
| 10 |
+
{
|
| 11 |
+
"topic": 11,
|
| 12 |
+
"prior_comments": 337,
|
| 13 |
+
"pi": 0.04669530275737841,
|
| 14 |
+
"september_comments": 236,
|
| 15 |
+
"supply_units": 6,
|
| 16 |
+
"supply_videos": 5
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"topic": 12,
|
| 20 |
+
"prior_comments": 143,
|
| 21 |
+
"pi": 0.019814327282804488,
|
| 22 |
+
"september_comments": 55,
|
| 23 |
+
"supply_units": 80,
|
| 24 |
+
"supply_videos": 24
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"topic": 14,
|
| 28 |
+
"prior_comments": 22,
|
| 29 |
+
"pi": 0.003048358043508383,
|
| 30 |
+
"september_comments": 9,
|
| 31 |
+
"supply_units": 59,
|
| 32 |
+
"supply_videos": 3
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"topic": 21,
|
| 36 |
+
"prior_comments": 0,
|
| 37 |
+
"pi": 0.0,
|
| 38 |
+
"september_comments": 0,
|
| 39 |
+
"supply_units": 34,
|
| 40 |
+
"supply_videos": 12
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"topic": 28,
|
| 44 |
+
"prior_comments": 1,
|
| 45 |
+
"pi": 0.00013856172925038105,
|
| 46 |
+
"september_comments": 0,
|
| 47 |
+
"supply_units": 36,
|
| 48 |
+
"supply_videos": 20
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"topic": 29,
|
| 52 |
+
"prior_comments": 16,
|
| 53 |
+
"pi": 0.0022169876680060967,
|
| 54 |
+
"september_comments": 0,
|
| 55 |
+
"supply_units": 0,
|
| 56 |
+
"supply_videos": 0
|
| 57 |
+
}
|
| 58 |
+
]
|