install.packages("devtools")
devtools::install_github("mmadoliat/KNNreg", force = TRUE)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:
Open the App
# Run the Shiny application
library(KNNreg)
file.edit(system.file("examples/KNNreg-App.R", package = "KNNreg"))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).