feat(svd): update 8 of 10 axis labels derived from motion content
Revise SVD_THEMES labels based on TF-IDF analysis of top 50 motions per component (pool size: current_parliament). Manual review of motion titles ensures labels reflect actual parliamentary content rather than party position semantics. Key corrections: - Axis 1: fiscal/economic policy vs social welfare + international rights - Axis 4: active international engagement vs restraint - Axis 5: pragmatic financial support vs progressive individual rights - Axis 6: fossil fuels/financial incentives vs climate/intl rights - Axis 7: practical-administrative vs idealistico-procedural (kept) - Axis 8: European defense cooperation vs domestic socioeconomic policy - Axis 9: concrete-administrative vs systemic reform - Axis 10: citizen protection vs government regulation Subagent analysis caught that axes 5 and 6 are NOT the same (Nationale soevereiniteit) — manual motion review confirms distinct content for each. Axes 1, 5, 6 had completely wrong labels. Refs: thoughts/explorer/svd_label_review.md See also: docs/brainstorms/2026-04-13-topic-derived-svd-labels-requirements.md
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
# Session: svd_axis_consistency_fix
|
||||
Updated: 2026-04-13T23:08:19Z
|
||||
|
||||
## Goal
|
||||
Ensure SVD components tab and compass show consistent party positions by using aligned PCA positions for components 1-2.
|
||||
|
||||
## Constraints
|
||||
- Right-wing parties (PVV, FVD, JA21, SGP) must appear on RIGHT side of all axes in both visualizations
|
||||
- SVD labels should reflect voting patterns, not semantic content
|
||||
- Components 1-2 use aligned PCA; Components 3-10 use raw SVD values
|
||||
|
||||
## Progress
|
||||
### Done
|
||||
- [x] Fix SVD axis label alignment (removed static left_pole/right_pole, derive from runtime flip)
|
||||
- [x] Fix score mismatch in tijdtraject view (components 3-10 use per-window scores, not Procrustes-aligned)
|
||||
- [x] Fix PCA alignment consistency between compass and SVD components tab
|
||||
- [x] Update all 10 component labels based on motion analysis
|
||||
- [x] Add pool-based motion assignment (10 motions per component)
|
||||
- [x] Add SVD axis alignment and label consistency tests
|
||||
|
||||
### In Progress
|
||||
- (none)
|
||||
|
||||
### Blocked
|
||||
- (none)
|
||||
|
||||
## Key Decisions
|
||||
- **Components 1-2 use aligned PCA positions**: Consistent with compass visualization, derived from `load_positions()`
|
||||
- **Components 3-10 use raw SVD scores**: Per-window flip handles orientation, Procrustes not needed
|
||||
- **New helper `_get_aligned_party_coords()`**: Converts aligned MP positions to party centroids for components 1-2
|
||||
|
||||
## Next Steps
|
||||
1. Run visual verification to confirm compass and SVD tab show consistent party orderings
|
||||
2. Consider adding tests for the new `_get_aligned_party_coords()` helper
|
||||
3. Update any documentation that references the old behavior
|
||||
|
||||
## File Operations
|
||||
### Read
|
||||
- `explorer.py` (components tab, load_positions, trajectory rendering)
|
||||
- `analysis/political_axis.py` (PCA alignment, compute_party_centroids)
|
||||
- `analysis/config.py` (SVD_THEMES)
|
||||
- `analysis/svd_labels.py` (label derivation)
|
||||
|
||||
### Modified
|
||||
- `explorer.py` - Added `_get_aligned_party_coords()`, updated component 1-2 to use aligned positions
|
||||
|
||||
## Critical Context
|
||||
- **Commit 823df6f**: Removed static left_pole/right_pole, fixed tijdtraject score mismatch
|
||||
- **Commit 12936c5**: Use aligned PCA for components 1-2 (consistent with compass)
|
||||
- **Commit 036c3f9**: Extended aligned PCA to all SVD components 1-10
|
||||
- **Commit 3a67100**: Use aligned PCA scores for time trajectory view
|
||||
- **Related docs**: `docs/solutions/ui-bugs/svd-axis-pole-labels-incorrect-after-flip.md`
|
||||
|
||||
## Working Set
|
||||
- Branch: `main`
|
||||
- Key files: `explorer.py`, `analysis/config.py`, `analysis/svd_labels.py`, `tests/test_svd_axis_alignment.py`
|
||||
Reference in New Issue
Block a user