Current project progress: Final Implementation Fully Deployed!
🔗 Live Demo: View our Shiny App on Posit Connect Cloud
This R package and interactive Shiny application provide a comprehensive toolkit for exploring the Bias-Variance Tradeoff through Monte Carlo simulations. It allows users to visualize how model complexity (Polynomial Degree or k-NN) affects error decomposition in real-time.
- Dynamic Hover Charts: Built with
plotly, allowing users to see precise MSE, Bias², and Variance values by hovering over the curves. - Model Selection: Compare Polynomial Regression and k-Nearest Neighbors (k-NN) models side-by-side.
- Best Complexity Detection: The app automatically identifies the optimal complexity (e.g., "Degree 5") that minimizes Test MSE.
- Automated Feedback: Provides clear, text-based guidance on the recommended model and minimum test error achieved.
- Prediction Spread: Visualizes model stability by plotting 100+ individual MC fitted curves against the true function.
- Smooth UX: Integrated
shinycssloadersto provide visual feedback (spinners) during heavy simulation computations.
- Exportable Results: Users can download the raw pointwise simulation data as a
.csvfor further independent analysis.
- Cross-Platform Tested:
devtools::check()passed with 0 Errors / 0 Warnings on Windows 11, macOS, and Ubuntu 24.04 LTS. - Dependency Management: Full environment reproducibility via
manifest.jsonand a robustDESCRIPTIONfile.
In accordance with the course requirements, a detailed Generative AI Usage Statement is included in the package vignettes.
- Vignette Path:
vignettes/ai_usage_statement.Rmd - Final Update: Includes documentation on refactoring visualizations to
plotlyand implementing asynchronous UI feedback.