Skip to content

Feature/dimentionalyreduction exercise for students to complete matrix mystics - #94

Open
VigneshRapolu wants to merge 4 commits into
vicharanashala:mainfrom
VigneshRapolu:feature/dimentionalyreduction-exercise
Open

Feature/dimentionalyreduction exercise for students to complete matrix mystics#94
VigneshRapolu wants to merge 4 commits into
vicharanashala:mainfrom
VigneshRapolu:feature/dimentionalyreduction-exercise

Conversation

@VigneshRapolu

Copy link
Copy Markdown

Summary

Adds an interactive dimensionality-reduction (PCA) exercise to the student
dashboard, as a new activity for the Matrix Mystics Module 6 topics — which
currently have no worked activity attached to them.

What this adds

  • New PCAInteractive component in client/src/main.jsx.
  • New "PCA Exercise" tab on the student dashboard, alongside the existing
    SP Bank, Polls, and Leaderboard tabs.
  • A small editable table (student -> two attendance-style values). Editing
    any value live-updates:
    • the scatter plot of all points
    • the mean and covariance
    • the best-fit direction (PC1)
    • each point's projection onto that direction
    • the "variance explained" percentage

Scope

  • Client-side only. No backend routes, no database queries, no new
    dependencies.
  • Starting values are illustrative placeholders, not real student data —
    fully editable and self-contained, so it's reproducible without any DB
    connection.
  • Purely additive: no changes to scoring, SP calculation, or any other
    existing feature/route.

Out of scope (left for a future PR)

  • Wiring this up to real Spurti attendance/poll data. That needs a
    separate decision on which fields to expose and how, so it's left out
    here to keep this PR small and self-contained.

Testing

Verified locally: editing table values updates the plot, mean, covariance,
PC1 direction, and variance-explained % correctly with no console errors.

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