Skip to content

Audit: algorithmic/math correctness, prose accuracy, and student-facing comments (all lessons) #16

Description

@jonfroehlich

A deep, deliberate audit that goes beyond "does it run" (CI already covers execution) and beyond the Pass-3 readability review. For each lesson, double/triple-check three things:

  1. Algorithmic & mathematical correctness — the code actually implements the technique correctly (edge cases, indexing, normalization, units), e.g.:
    • Quantization & Sampling: bit-depth/levels math, Nyquist, aliasing demo, the plot_audio vs plot_signal title bug (Quantization & Sampling notebook: plot_signal called with quantization_bits in the title slot (should be plot_audio) #10).
    • Comparing Signals: cross-correlation / dot-product alignment, Euclidean vs DTW (librosa.sequence.dtw).
    • Frequency Analysis: DFT/FFT scaling, half-spectrum, frequency-bin → Hz mapping, peak picking.
    • Step Tracker: smoothing → find_peaks → min-distance pairing logic.
    • Gesture (Shape/Feature): k-fold construction & leakage, feature definitions (mean/var/dominant freq), StandardScaler→SVM pipeline, confusion-matrix labels.
  2. Prose accuracy — every explanatory claim matches the math and the code (no stale or hand-wavy statements; numbers/units in the text agree with what the cell computes).
  3. Comment density for students — non-obvious steps carry a clear, correct comment; the why, not just the what. Add where thin; keep crisp (no bloat).

Also re-audit the helper packages (makelab/signal.py, makelab/audio.py, gesturerec/signalproc.py, data.py, experiments.py, vis.py) for the same three dimensions, since the notebooks delegate core math to them.

Checklist

  • 1. Intro to Python
  • 2. Intro to NumPy
  • 3. Intro to Matplotlib
  • 4. Quantization & Sampling
  • 5. Comparing Signals
  • 6. Frequency Analysis
  • 7. Step Tracker (Exercises + WithExampleSolution)
  • 8. Gesture Recognition: Shape-Based
  • 9. Gesture Recognition: Feature-Based
  • 10. Feature Selection & Hyperparameter Tuning
  • helper packages (makelab, gesturerec)

File any concrete defects found as their own issues (e.g. #10) and check them off here.

Part of v2.0 textbook-integration readiness — see makeabilitylab/physcomp#116.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions