Skip to content

feat(math): small-N degenerate parity — run the real math on tiny matrices in clojure-legacy mode#2653

Draft
jucor wants to merge 1 commit into
spr/edge/7c20f8e1from
spr/edge/00d8bc52
Draft

feat(math): small-N degenerate parity — run the real math on tiny matrices in clojure-legacy mode#2653
jucor wants to merge 1 commit into
spr/edge/7c20f8e1from
spr/edge/00d8bc52

Conversation

@jucor

@jucor jucor commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Clojure has NO small-dim guards: a 1x1 single-vote conversation computes
center = the vote, a rank-capped zero component, a repness entry (the
best-agree guarantee holds for one comment; rest-stats over zero other
groups fall back to the (0+1)/(0+2) prior) and a consensus selection —
pinned exactly by the vw every-vote step-0 recording (journal 2026-07-22
'every-vote step-0 diagnosis COMPLETE'). Python short-circuited to zeros/
empties below 2x2, which made the every-vote battery entry diverge from
step 0 (4650/4683 steps).

Legacy-gated changes (improved keeps every historical guard):

  • _compute_pca + pca_project_dataframe: <2 guards only fire on truly
    EMPTY dims in legacy; the powerit path runs at any size (comps already
    rank-capped; zero-variance yields Clojure's zero vector). Projections
    zero-pad to 2-D (Clojure's [pc1 pc2] destructure zero-fills a missing
    second component), as does the emitted comment-projection.
  • conv_repness: the shape<2 early return yields to the real computation.

TDD: single-vote fixtures with exact Clojure-derived values (center -1.0,
p-success 2/3, repness 4/3, best-agree), RED observed; improved-mode
guards pinned unchanged.

commit-id:00d8bc52


Stack:


⚠️ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.

…rices in clojure-legacy mode

Clojure has NO small-dim guards: a 1x1 single-vote conversation computes
center = the vote, a rank-capped zero component, a repness entry (the
best-agree guarantee holds for one comment; rest-stats over zero other
groups fall back to the (0+1)/(0+2) prior) and a consensus selection —
pinned exactly by the vw every-vote step-0 recording (journal 2026-07-22
'every-vote step-0 diagnosis COMPLETE'). Python short-circuited to zeros/
empties below 2x2, which made the every-vote battery entry diverge from
step 0 (4650/4683 steps).

Legacy-gated changes (improved keeps every historical guard):
- _compute_pca + pca_project_dataframe: <2 guards only fire on truly
  EMPTY dims in legacy; the powerit path runs at any size (comps already
  rank-capped; zero-variance yields Clojure's zero vector). Projections
  zero-pad to 2-D (Clojure's [pc1 pc2] destructure zero-fills a missing
  second component), as does the emitted comment-projection.
- conv_repness: the shape<2 early return yields to the real computation.

TDD: single-vote fixtures with exact Clojure-derived values (center -1.0,
p-success 2/3, repness 4/3, best-agree), RED observed; improved-mode
guards pinned unchanged.

commit-id:00d8bc52
This was referenced Jul 22, 2026
@jucor jucor changed the title feat(math): small-N degenerate parity — run the real math on tiny matrices in clojure-legacy mode feat(math): small-N degenerate parity — run the real math on tiny mat… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/7c20f8e1 to edge July 22, 2026 08:11
@jucor jucor changed the title feat(math): small-N degenerate parity — run the real math on tiny mat… feat(math): small-N degenerate parity — run the real math on tiny matrices in clojure-legacy mode Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/7c20f8e1 July 22, 2026 08:11
@jucor jucor changed the title feat(math): small-N degenerate parity — run the real math on tiny matrices in clojure-legacy mode feat(math): small-N degenerate parity — run the real math on tiny mat… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/7c20f8e1 to edge July 22, 2026 09:58
@jucor jucor changed the title feat(math): small-N degenerate parity — run the real math on tiny mat… feat(math): small-N degenerate parity — run the real math on tiny matrices in clojure-legacy mode Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/7c20f8e1 July 22, 2026 09:58
@jucor jucor changed the title feat(math): small-N degenerate parity — run the real math on tiny matrices in clojure-legacy mode feat(math): small-N degenerate parity — run the real math on tiny mat… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/7c20f8e1 to edge July 22, 2026 11:20
@jucor jucor changed the title feat(math): small-N degenerate parity — run the real math on tiny mat… feat(math): small-N degenerate parity — run the real math on tiny matrices in clojure-legacy mode Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/7c20f8e1 July 22, 2026 11:21
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