Skip to content

PR-CS-8: Association strength (ΔR²) — per-scope effect-size guide for the Analyze Wall#290

Merged
jukka-matti merged 8 commits into
mainfrom
feat/cs-8-association-strength
Jun 3, 2026
Merged

PR-CS-8: Association strength (ΔR²) — per-scope effect-size guide for the Analyze Wall#290
jukka-matti merged 8 commits into
mainfrom
feat/cs-8-association-strength

Conversation

@jukka-matti
Copy link
Copy Markdown
Owner

What

Surfaces each factor's semipartial R² ("association strength, ΔR²") in the Analyze Wall's ModelBuilderBand — the unique share of the spread each factor accounts for inside the drilled scope. An association magnitude paired with the existing partial p, framed explicitly as a clue to investigate, never a cause verdict.

Closes PR-CS-8 of the connective-surface redesign (sub-plan: docs/superpowers/plans/2026-06-02-cs-8-association-strength.md).

Commits (8)

  1. feat(stats)perFactorDeltaR2 pure helper (semipartial R², O(1) reads off the enumerated subset index, no new regression; raw R² so ≥0, clamped)
  2. test(stats) — empty-baseline ΔR² coverage + decouple tests from the subset-key encoding
  3. feat(i18n) — 4 association-strength/ΔR² labels across all 32 locales + the MessageCatalog interface
  4. feat(analyze) — render per-factor ΔR² bars + value + a "not a verdict" framing line; re-point captured topFactor to highest-ΔR²
  5. refactor(analyze) — extract byDeltaR2Desc (single comparator for the 3 sort sites)
  6. test(analyze) — lock in per-scope vital-few re-rank on drill + ΔR² numeric-signal guard
  7. test(analyze) — make the re-rank test load-bearing (junk Noise candidate + balanced wobble)
  8. docs(cs-8) — refine LOCKED chore(deps): bump actions/upload-artifact from 4.6.2 to 7.0.0 #2 → effect-size-with-p (spec §2 + decision-log + source headers)

Design (pinned in the sub-plan)

  • Magnitude = per-factor semipartial R² (R²(kept) − R²(kept∖f) for a kept factor; gain-on-add for a candidate) — the same numerator the nested-F partial p is built on. The effect size paired with the existing p.
  • Non-summing per ADR-073 — raw semipartials; correlated factors' shared variance is attributed to no single factor (the caption says so). No forced variance decomposition.
  • Refines LOCKED chore(deps): bump actions/upload-artifact from 4.6.2 to 7.0.0 #2, does not reopen it: ΔR² is an effect size, not a model-selection criterion → still no Cp/BIC on the surface.

Grounding corrections during build (logged for the method record)

  • Task 2 (i18n) was a 33-file change, not 1 — the plan assumed a derived MessageKey union, but MessageCatalog is a closed interface with 32 hand-maintained complete locale catalogs (English placeholders are the convention for technical labels, per fe-1/fe-2a/fe-2b). Synced via a deterministic script; verified by the tsc build + the 70-test i18n completeness suite.
  • The re-rank integration test was made load-bearing — the first cut only had one eligible factor in the drilled scope (couldn't tell re-rank from "show the sole factor"). Added a junk Noise candidate that must NOT be kept in Region A, so the assertion genuinely requires per-scope recomputation.

Verification

  • pr-ready-check.sh: ✓ all checks passed (full turbo test + 4 builds + lint + boundary + dist integrity).
  • Final adversarial review (Opus): Ready to merge — Yes, no Critical/Important. Independently re-ran both full suites (core 3507, ui 2861), all 4 builds, and a standalone statistical probe of the fixtures; confirmed raw-rSquared correctness, ADR-073 non-summing, never-a-verdict framing, i18n completeness, and that topFactor's two downstream consumers only map it to linkedFactor (no p-ordering assumption).

Non-blocking follow-ups (Minor, from final review)

  • Theoretical edge: if a multi-factor reduced OLS subset were ever skipped during enumeration, the kept-branch fallback would over-state ΔR². Near-impossible in practice (the displayed kept set is always enumerated; a reduced set has strictly fewer columns). Left as-is.
  • Narrow-band: the kept row packs DeltaBar + ΔR² + p next to the factor name; the container is overflow-auto so it scrolls, not clips. Worth a glance at laptop width in the real Wall.

🤖 Generated with Claude Code

jukka-matti and others added 8 commits June 3, 2026 12:29
…n strength)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t framing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Part A — integration test that uses the REAL engine to prove drilling into a
scope (Region=A, with Region constant) re-ranks the vital few from [Region]
to [Machine]. Fixture required a 500-unit Region gap vs 8-unit Machine effect
to make Region's marginal ΔR² globally dominant over Machine's.

Part B — strengthens the existing ΔR² presence test with a numeric-signal
guard (parseFloat > 0) to catch dead-wiring where all values fall back to 0.

Part C — skipped: shiftDominatedRows keeps only one factor (Shift); a
two-kept-factor deterministic fixture fiddly enough to risk brittleness.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mean-beoynd-lite-pwa Building Building Preview, Comment Jun 3, 2026 11:18am
variscout_website Building Building Preview, Comment Jun 3, 2026 11:18am

@jukka-matti jukka-matti merged commit fc8aa55 into main Jun 3, 2026
1 of 3 checks passed
@jukka-matti jukka-matti deleted the feat/cs-8-association-strength branch June 3, 2026 11:20
jukka-matti added a commit that referenced this pull request Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant