-
Notifications
You must be signed in to change notification settings - Fork 1
feat: name leftover-map unexplained share on leftover pairs (v2.12.27) #537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
776de53
feat: name leftover-map unexplained share on leftover pairs (v2.12.27)
seonghobae 9a63955
fix: typecheck leftover unexplained-share UI (v2.12.27)
seonghobae 56813a7
Merge branch 'main' into feat/leftover-map-unexplained-share-v21227
seonghobae e066ebb
Merge branch 'main' into feat/leftover-map-unexplained-share-v21227
seonghobae b1d01d1
Merge remote-tracking branch 'origin/main' into pr537-work
seonghobae 05303e8
Merge origin/main into feat/leftover-map-unexplained-share-v21227 (wa…
seonghobae 2b3bcfb
Merge remote-tracking branch 'origin/main' into pr537
seonghobae ebfd712
Merge remote-tracking branch 'origin/main' into pr537
seonghobae d5ac65d
merge: rebase onto main; ADR 0202 -> 0203 for the unexplained-share i…
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| ## 2.12.27 — Leftover-map unexplained leftover share | ||
|
|
||
| - Persist unexplained leftover share `s = U_c² / R̃²` of centered | ||
| leftover on leftover post–criterion pairs (ADR 0203). After | ||
| `make seed`, closest and farthest leftover pairs sit above the | ||
| member list with `U²/R̃²` next to leftover-map distance `d`; click | ||
| opens that post. Omit the badge when the share is missing. Never | ||
| invent a leftover score. Do not persist leftover-map unexplained | ||
| leftover `U` or reconstruction `R̂`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| # ADR 0203 — Name unexplained leftover share on period-report pair rows | ||
|
|
||
| **Decision status:** Accepted | ||
| **Date:** 2026-08-24 | ||
|
|
||
| Amends [ADR 0048](0048-persist-lsirm-leftover-pairs.md) and | ||
| [ADR 0049](0049-leftover-pair-report-ui.md). | ||
|
|
||
| ## Context | ||
|
|
||
| ADR 0048 already persists leftover-map distance `d = ‖ξ_p − ζ_i‖` and | ||
| leftover residual `R = Y − E[Y|θ, item]` on `report_leftover_pair`. | ||
| ADR 0049 already renders closest and farthest pairs above the member | ||
| list and opens the named post. Distance is the Jeon et al. (2021, | ||
| eq. 3) map gap. Gabriel (1971) reconstructs a *centered* matrix from | ||
| the biplot as the inner product of person and item coordinates. The | ||
| leftover map buyers read is two-axis: unused axes pad with zero, and | ||
| hidden SVD axes after the second are dropped. Two-axis reconstruction | ||
| `R̂_c = ξ_{1:2} · ζ_{1:2}` therefore recovers centered leftover | ||
| `R̃ = R − center`, not raw residual `R`. Hiding unexplained leftover | ||
| share `s = U_c² / R̃²` (`U_c = R̃ − R̂_c`) lets a buyer read leftover | ||
| residual `R` or leftover-map distance `d` as the leftover the two-axis | ||
| map does not reconstruct. Subtracting reconstruction from raw `R` | ||
| (or dividing by `R²`) leaves the grand mean inside the named leftover, | ||
| so a fully reconstructed rank-1 cell would look unexplained whenever | ||
| `center ≠ 0`. | ||
|
|
||
| This increment does not persist leftover-map reconstruction `R̂` or | ||
| `R̂_c`, does not persist leftover-map unexplained leftover `U` or | ||
| `U_c`, does not persist leftover-map coordinates, does not name | ||
| leftover-map inner product, cosine, or length, does not name observed | ||
| `Y` / expected `E`, does not name leftover-map rank, does not split | ||
| leftover-map distance onto two axes, and does not land Post quality on | ||
| the leftover criterion. Leftover-map distance stays full-rank | ||
| Euclidean. Centered leftover `U_c` and reconstruction `R̂_c` are | ||
| computed internally so `s` is honest, then discarded. | ||
|
|
||
| The unprotected-stack reconstructions for neighbouring leftover facts | ||
| use 0162–0182. This increment originally claimed **0183**, but that | ||
| number collided with an unrelated, already-merged GNB navigation ADR | ||
| (`0183-gnb-four-korean-chrome.md`) by the time this branch reached | ||
| `main`, so it renumbers to **0203** at merge -- above every ADR number | ||
| in use on `main` (≤ 0201) so it cannot collide again. It does not | ||
| collide with leftover-map unexplained leftover (0182), leftover-map | ||
| reconstruction (0181), leftover-map length (0181 on the length stack), | ||
| leftover-map cosine (0180), leftover-map inner product (0179), leftover | ||
| residual disclosure (0178), leftover observed `Y` / expected `E` | ||
| (0170), leftover-map rank (0172), two-axis leftover-map distance | ||
| (0166), leftover coverage (0165 / 0168), leftover-map axis share | ||
| (0148), or leftover interaction-map persistence (0121). | ||
|
|
||
| ## Decision | ||
|
|
||
| Each leftover pair names `leftover_map_unexplained_share` — unexplained | ||
| leftover share `s = U_c² / R̃²` of centered leftover after two-axis | ||
| Gabriel reconstruction `R̂_c = ξ_{1:2} · ζ_{1:2}`. Migration `0202` | ||
| is the single source of the column on every install path, fresh or | ||
| existing -- shipped migrations (`0001` / `0012`) are never edited after | ||
| the fact. The column is nullable so older leftover rows keep distance | ||
| and residual without fabricating a share. A leftover map with no | ||
| complete-case rectangle names no pair at all (ADR 0168), so there is | ||
| no row to fabricate a share on. A rank-0 origin map that still has a | ||
| complete-case rectangle stores `0.0` (`R̃ = 0` and `U_c = 0`), not a | ||
| missing value. A fully reconstructed rank-1 cell stores `0.0` even when | ||
| the grand mean of `R` is nonzero. A non-finite or negative share stores | ||
| null rather than inventing a leftover score. Named check | ||
| `leftover_pair_unexplained_share_nonnegative_chk` rejects a stored | ||
| negative share. Do not persist `leftover_map_unexplained` or | ||
| `leftover_map_reconstruction`. | ||
|
|
||
| The pair button shows `U²/R̃² {share}` next to leftover-map distance | ||
| `d` when the value is a finite non-negative number. Next action: | ||
| leftover map leaves unexplained share `s` of centered leftover after | ||
| IRT main effects; open this post to read the named criterion. A | ||
| missing or non-finite share omits the badge and keeps the existing | ||
| closest/farthest next action. Do not invent a leftover score. Do not | ||
| invent a theta. | ||
|
|
||
| ## Consequences | ||
|
|
||
| `GET /api/reports/{grouping}/{period}` returns | ||
| `leftover_map_unexplained_share`. After `make seed`, closest and | ||
| farthest leftover pairs sit above the member list with named | ||
| `U²/R̃²` next to `d`; click opens that post. Hidden posts stay hidden. | ||
|
|
||
| ## Related | ||
|
|
||
| Independent of leftover interaction-map persistence, leftover-criterion | ||
| evaluation landing, leftover residual disclosure, leftover observed | ||
| `Y` / expected `E`, leftover-map complete-case coverage, leftover-map | ||
| axis share, leftover pairs on the grouping comparison strip, two-axis | ||
| leftover-map distance, leftover-map rank, leftover-map inner product, | ||
| leftover-map cosine, leftover-map length, leftover-map reconstruction, | ||
| and leftover-map unexplained leftover. | ||
|
|
||
| ## References | ||
|
|
||
| Gabriel, K. R. (1971). The biplot graphic display of matrices with | ||
| application to principal component analysis. *Biometrika, 58*(3), | ||
| 453–467. https://doi.org/10.1093/biomet/58.3.453 | ||
|
|
||
| Jeon, M., Jin, I. H., Schweinberger, M., & Baugh, S. (2021). Mapping | ||
| unobserved item–respondent interactions: A latent space item response | ||
| model with interaction map. *Psychometrika, 86*(2), 378–403. | ||
| https://doi.org/10.1007/s11336-021-09762-5 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 ADR link points to a nonexistent file
This amended-by entry links
ADR 0202, but the decision record is0203-leftover-map-unexplained-share.md;0202is only the migration filename, so the link resolves to nothing. The same wrong number recurs at 0048-persist-lsirm-leftover-pairs.md, 0003-fast-mlsirm-report-integration.md, and CHANGELOG.md, while ADR 0049 and AGENTS.md cite 0203.Was this helpful? React with 👍 or 👎 to provide feedback.