[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EKX1JM74BT67F4W2HVYYZW":3,"skill-same:01M6EKX1JM74BT67F4W2HVYYZW":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":30,"linkOnly":31,"markdownContent":32,"markdownBody":33,"frontMatter":34,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":55,"repositoryHtmlUrl":56,"repositoryHomepageUrl":6,"ownerHtmlUrl":57,"ownerBlogUrl":58,"ownerDescription":59,"updatedAt":60,"install":61,"resources":74},"01M6EKX1JM74BT67F4W2HVYYZW","cluster-id-reconstruction-from-fingerprints",null,"When a dataset suppresses cluster IDs but keeps cluster-level scale variables, recover pseudo-cluster IDs by grouping rows with matching scale-variable profiles.","cgpan\u002Fedm-ars-public","cgpan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F118746117?v=4","01M6EKT5TG36Q3GH340QN8RH08","Chenguang Pan","01M6EKT5YTQVRARGJF0VPA1SY7",5,"MIT","https:\u002F\u002Fgithub.com\u002Fcgpan\u002Fedm-ars-public\u002Fblob\u002Fmain\u002Fskills\u002Fmethodology\u002Fcluster-id-reconstruction-from-fingerprints\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29],"id","cluster","cluster id reconstruction from fingerprints","methodology","ids","public","but","grouping","matching","dataset","scale","2026-11-10 10:12:30",false,"---\nname: cluster-id-reconstruction-from-fingerprints\nlayer: methodology\ndescription: When a dataset suppresses cluster IDs but keeps cluster-level scale variables, recover pseudo-cluster IDs by grouping rows with matching scale-variable profiles.\ntrigger_keywords:\n  - cluster\n  - clusters\n  - reconstruction\n  - reconstruct\n  - fingerprint\n  - fingerprints\n  - pseudo-id\n  - suppressed\napplicable_task_types: []\napplicable_datasets:\n  - hsls09_public\napplicable_stages:\n  - DataEngineer\npriority: 2\nreferences_skills: []\nresources: []\nversion: \"1.0\"\n---\n\n# Cluster ID Reconstruction from Fingerprints\n\nWhen a public-use file suppresses the cluster identifier (school ID,\nhospital ID, classroom ID, ...) but retains cluster-level scale\nvariables that are constant within each cluster, you can recover\n**pseudo-cluster IDs** by grouping rows whose scale-variable profile\nmatches.\n\nThis is a generic technique. The dataset-layer skill is responsible for\nnaming the actual fingerprint variables; this skill describes the\nrecipe and the quality diagnostics.\n\n## When the technique applies\n\nAll of the following must hold:\n\n1. The true cluster ID is suppressed in the data file you have access\n   to (it would normally be in a restricted-use release).\n2. There are *K ≥ 5* scale or categorical variables that are\n   **cluster-level aggregates** — same value for every row that belongs\n   to the same cluster, by data-collection design.\n3. You can tolerate approximate clusters: cluster boundaries are\n   recovered up to ties (two genuinely distinct clusters with the same\n   scale profile collapse into one pseudo-cluster).\n\nIf the third assumption fails — i.e., you need exact cluster identity —\nthis technique is unsuitable; use the restricted-use file or skip\ncluster-aware analyses.\n\n## Recipe\n\n```python\nimport pandas as pd\n\n# 1. Variance check. Each fingerprint variable must be ~constant\n#    within whatever proxy grouping you can construct (e.g. sample row\n#    of expected cluster size).\nfingerprint_vars = [\"\u003Cscale_1>\", \"\u003Cscale_2>\", ...]\nfor v in fingerprint_vars:\n    assert df[v].nunique() \u003C df.shape[0] \u002F expected_cluster_size, \\\n        f\"{v} varies too much to be a cluster-level fingerprint\"\n\n# 2. Group by the joint profile.\ndf[\"pseudo_cluster_id\"] = df.groupby(fingerprint_vars, dropna=False).ngroup()\n\n# 3. Quality diagnostics.\nn_clusters = df[\"pseudo_cluster_id\"].nunique()\nsizes = df.groupby(\"pseudo_cluster_id\").size()\ndiagnostics = {\n    \"n_clusters\": int(n_clusters),\n    \"expected_n_clusters\": expected_cluster_count,\n    \"cluster_size_mean\": float(sizes.mean()),\n    \"cluster_size_median\": float(sizes.median()),\n    \"cluster_size_min\": int(sizes.min()),\n    \"cluster_size_max\": int(sizes.max()),\n}\n```\n\n## Quality diagnostics — what to check\n\n| Diagnostic | Pass criterion |\n|---|---|\n| `n_clusters` | Within ±10% of `expected_n_clusters`; large under-count means fingerprints have too few combinations and clusters are colliding. |\n| `cluster_size_mean` | Within ±20% of (n_rows \u002F expected_n_clusters). |\n| `cluster_size_max` | No more than 3× the expected cluster size; outliers are likely collisions. |\n| Singleton clusters (size 1) | Should be rare (\u003C 5% of clusters); large singleton count means the fingerprint vars contain too much noise. |\n\nIf diagnostics fail, do NOT silently use the pseudo-IDs as if they were\ncorrect. Either:\n\n- Add another fingerprint variable and retry, or\n- Log the failure in `data_report.warnings` and proceed without\n  cluster-aware operations (no clustered CIs, no group-aware split).\n\n## What pseudo-IDs are good for\n\n- **Group-aware train\u002Ftest split** (`school-aware-train-test-split`):\n  ensures no cluster appears in both partitions.\n- **Group-aware inner CV** (`inner-cv-tuning-discipline`): prevents\n  within-cluster leakage during hyperparameter tuning.\n- **Clustered bootstrap CIs** (`clustered-bootstrap-ci-and-icc`):\n  cluster-level resampling for honest standard errors.\n\n## What pseudo-IDs are NOT good for\n\n- **Mixed-effects models with cluster random effects**: the\n  approximation introduces measurement error in cluster identity that\n  biases variance components. Use the restricted-use file instead.\n- **Reporting cluster-level summaries** (e.g., school-mean GPA):\n  collisions inflate the apparent variance of cluster-level statistics.\n\n## Handling the variance-check failure mode\n\nIf a putative fingerprint variable shows excessive within-cluster\nvariation, it is not actually cluster-level. Drop it from the\nfingerprint set and retry. Common culprits in survey panels:\n\n- Wave-revised composite scales (the value depends on which wave's\n  composite was used).\n- Variables that look school-level but are actually student-level\n  responses to a school question.\n\n## Source provenance\n\nCanonical source: `agent_prompts\u002Fdata_engineer.yaml` §step 6 \"School\nCluster Reconstruction\" (the recipe; HSLS variable names elided here).\n\nThis skill is the generic methodology half of the Decision-6 split. The\nHSLS-specific dataset skill `hsls09-school-fingerprints` supplies the\nconcrete fingerprint variable names and the expected cluster count\n(944 schools).\n","# Cluster ID Reconstruction from Fingerprints\n\nWhen a public-use file suppresses the cluster identifier (school ID,\nhospital ID, classroom ID, ...) but retains cluster-level scale\nvariables that are constant within each cluster, you can recover\n**pseudo-cluster IDs** by grouping rows whose scale-variable profile\nmatches.\n\nThis is a generic technique. The dataset-layer skill is responsible for\nnaming the actual fingerprint variables; this skill describes the\nrecipe and the quality diagnostics.\n\n## When the technique applies\n\nAll of the following must hold:\n\n1. The true cluster ID is suppressed in the data file you have access\n   to (it would normally be in a restricted-use release).\n2. There are *K ≥ 5* scale or categorical variables that are\n   **cluster-level aggregates** — same value for every row that belongs\n   to the same cluster, by data-collection design.\n3. You can tolerate approximate clusters: cluster boundaries are\n   recovered up to ties (two genuinely distinct clusters with the same\n   scale profile collapse into one pseudo-cluster).\n\nIf the third assumption fails — i.e., you need exact cluster identity —\nthis technique is unsuitable; use the restricted-use file or skip\ncluster-aware analyses.\n\n## Recipe\n\n```python\nimport pandas as pd\n\n# 1. Variance check. Each fingerprint variable must be ~constant\n#    within whatever proxy grouping you can construct (e.g. sample row\n#    of expected cluster size).\nfingerprint_vars = [\"\u003Cscale_1>\", \"\u003Cscale_2>\", ...]\nfor v in fingerprint_vars:\n    assert df[v].nunique() \u003C df.shape[0] \u002F expected_cluster_size, \\\n        f\"{v} varies too much to be a cluster-level fingerprint\"\n\n# 2. Group by the joint profile.\ndf[\"pseudo_cluster_id\"] = df.groupby(fingerprint_vars, dropna=False).ngroup()\n\n# 3. Quality diagnostics.\nn_clusters = df[\"pseudo_cluster_id\"].nunique()\nsizes = df.groupby(\"pseudo_cluster_id\").size()\ndiagnostics = {\n    \"n_clusters\": int(n_clusters),\n    \"expected_n_clusters\": expected_cluster_count,\n    \"cluster_size_mean\": float(sizes.mean()),\n    \"cluster_size_median\": float(sizes.median()),\n    \"cluster_size_min\": int(sizes.min()),\n    \"cluster_size_max\": int(sizes.max()),\n}\n```\n\n## Quality diagnostics — what to check\n\n| Diagnostic | Pass criterion |\n|---|---|\n| `n_clusters` | Within ±10% of `expected_n_clusters`; large under-count means fingerprints have too few combinations and clusters are colliding. |\n| `cluster_size_mean` | Within ±20% of (n_rows \u002F expected_n_clusters). |\n| `cluster_size_max` | No more than 3× the expected cluster size; outliers are likely collisions. |\n| Singleton clusters (size 1) | Should be rare (\u003C 5% of clusters); large singleton count means the fingerprint vars contain too much noise. |\n\nIf diagnostics fail, do NOT silently use the pseudo-IDs as if they were\ncorrect. Either:\n\n- Add another fingerprint variable and retry, or\n- Log the failure in `data_report.warnings` and proceed without\n  cluster-aware operations (no clustered CIs, no group-aware split).\n\n## What pseudo-IDs are good for\n\n- **Group-aware train\u002Ftest split** (`school-aware-train-test-split`):\n  ensures no cluster appears in both partitions.\n- **Group-aware inner CV** (`inner-cv-tuning-discipline`): prevents\n  within-cluster leakage during hyperparameter tuning.\n- **Clustered bootstrap CIs** (`clustered-bootstrap-ci-and-icc`):\n  cluster-level resampling for honest standard errors.\n\n## What pseudo-IDs are NOT good for\n\n- **Mixed-effects models with cluster random effects**: the\n  approximation introduces measurement error in cluster identity that\n  biases variance components. Use the restricted-use file instead.\n- **Reporting cluster-level summaries** (e.g., school-mean GPA):\n  collisions inflate the apparent variance of cluster-level statistics.\n\n## Handling the variance-check failure mode\n\nIf a putative fingerprint variable shows excessive within-cluster\nvariation, it is not actually cluster-level. Drop it from the\nfingerprint set and retry. Common culprits in survey panels:\n\n- Wave-revised composite scales (the value depends on which wave's\n  composite was used).\n- Variables that look school-level but are actually student-level\n  responses to a school question.\n\n## Source provenance\n\nCanonical source: `agent_prompts\u002Fdata_engineer.yaml` §step 6 \"School\nCluster Reconstruction\" (the recipe; HSLS variable names elided here).\n\nThis skill is the generic methodology half of the Decision-6 split. The\nHSLS-specific dataset skill `hsls09-school-fingerprints` supplies the\nconcrete fingerprint variable names and the expected cluster count\n(944 schools).\n",{"name":5,"layer":22,"version":35,"priority":36,"resources":37,"description":7,"trigger_keywords":38,"applicable_stages":46,"references_skills":48,"applicable_datasets":49,"applicable_task_types":51},"1.0",2,[],[20,39,40,41,42,43,44,45],"clusters","reconstruction","reconstruct","fingerprint","fingerprints","pseudo-id","suppressed",[47],"DataEngineer",[],[50],"hsls09_public",[],"main","1aeaead66d2bf876109f3b101005d2eed54041d9","skills\u002Fmethodology\u002Fcluster-id-reconstruction-from-fingerprints",0,"https:\u002F\u002Fgithub.com\u002Fcgpan\u002Fedm-ars-public","https:\u002F\u002Fgithub.com\u002Fcgpan","https:\u002F\u002Fcpan.ai","Ph.D. candidate in Measurement, Evaluation, and Statistics.","2026-09-28 20:39:06",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add cgpan\u002Fedm-ars-public --skill cluster-id-reconstruction-from-fingerprints",{"tool":67,"command":68},"bunx","bunx skills add cgpan\u002Fedm-ars-public --skill cluster-id-reconstruction-from-fingerprints",{"tool":70,"command":71},"pnpm","pnpm dlx skills add cgpan\u002Fedm-ars-public --skill cluster-id-reconstruction-from-fingerprints","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcgpan\u002Fedm-ars-public\u002Fblob\u002Fmain\u002Fskills\u002Fmethodology\u002Fcluster-id-reconstruction-from-fingerprints\u002FSKILL.md",true,[],[76,89,103,112,124,133],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":30},"01M6EM1ZTQZVAP90DZTVBHCCFB","acm-fixture","Fixture writing skill for ACM acmart sigconf paper output.","https:\u002F\u002Fgithub.com\u002Fcgpan\u002Fedm-ars-public\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fwriting\u002Facm-fixture\u002FSKILL.md",[],[83,84,85,86,87,88],"acm fixture","fixture","writing","LaTeX","writer","paper",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":30},"01M6EM1XNFETAZFGPHQPAXKBYN","prediction-fixture","Fixture skill for the prediction task type; references shap-fixture.","https:\u002F\u002Fgithub.com\u002Fcgpan\u002Fedm-ars-public\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Ftask-type\u002Fprediction-fixture\u002FSKILL.md",[],[84,96,97,98,99,100,101,102],"prediction fixture","task","type","references","fixture skill","shap","analyst",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":30},"01M6EM1V4MQXYGQ7K2ZDJRAPSM","causal-fixture","Fixture skill for the causal_inference task type.","https:\u002F\u002Fgithub.com\u002Fcgpan\u002Fedm-ars-public\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Ftask-type\u002Fcausal-fixture\u002FSKILL.md",[],[84,110,98,97,111,100],"causal fixture","inference",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":30},"01M6EM1SCWFZZ2ACSAP65GNWK9","shap-fixture","Fixture methodology for SHAP feature importance analysis.","https:\u002F\u002Fgithub.com\u002Fcgpan\u002Fedm-ars-public\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fmethodology\u002Fshap-fixture\u002FSKILL.md",[],[119,84,101,120,22,121,122,123],"shap fixture","feature importance","analysis","explainer","feature",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":30},"01M6EM1PZC1MK1G0D1YFVYAQ9W","cluster-recon-fixture","Fixture methodology for reconstructing cluster IDs from fingerprint variables.","https:\u002F\u002Fgithub.com\u002Fcgpan\u002Fedm-ars-public\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fmethodology\u002Fcluster-recon-fixture\u002FSKILL.md",[],[131,132,20,84,23,22],"recon","cluster recon fixture",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":30},"01M6EM1MZVKMSWEXZ7TJ45DS04","hsls09-fixture","Fixture skill for HSLS:09 with a bundled YAML resource and one cross-reference.","https:\u002F\u002Fgithub.com\u002Fcgpan\u002Fedm-ars-public\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fskills\u002Fdataset\u002Fhsls09-fixture\u002FSKILL.md",[],[84,140,141,24,142,100,28,131,20,143],"hsls09 fixture","yaml","reference","registry"]