Hands-on: k-NN Regression in Shiny
Overview
In this 30 min session you will:
Launch and explore the k-NN Shiny app
Adjust k, select backend (R vs C++)
Observe train/test performance and parity plots
Setup
Download the Shiny app:
curl -O https://raw.githubusercontent.com/mmadoliat/WSoRT/refs/heads/main/R/app.RLaunch the App
# Run the Shiny application
shiny::runApp('app.R')Tasks
- Change the train/test split ratio in
make_split()(e.g. 80/20). - Add a slider input for the split ratio in
uiand update server logic. - Extend the performance panel to show Mean Absolute Error (MAE).