Homework Assignment
For additional practice with Shiny and Rcpp, consider completing these exercises.
1. Shiny App Enhancement
- Dynamic Predictors: In the k-NN app, add two multi-select inputs that allow users to choose the two predictor variables at runtime.
- Download Button: Implement functionality to download the test-set predictions as a CSV file.
2. Rcpp Performance Study
- Benchmark Script: Compare runtimes for pure R vs Rcpp implementations across combinations of sample size \(n \in \{500, 1000, 2000\}\) and feature count \(p \in \{3, 5, 10\}\).
Good luck, and feel free to reach out with any questions!