Shiny app to visually explore and compare classification boundaries for built-in, custom, and tidymodels algorithms in 2D
Source:R/app.R
explorapp.RdShiny app to visually explore and compare classification boundaries for built-in, custom, and tidymodels algorithms in 2D
Usage
explorapp(data = NULL, target_col = NULL, custom_models = list())Arguments
- data
Optional data frame to import directly into the app.
- target_col
Optional string specifying the column in
datathat contains the true class labels.- custom_models
A list of custom models to inject into the app's comparison UI. Each element should be a named list containing at least
fn(the model fitting function). Optionally, it can containargs(a list of arguments to pass tofn) andpredict_args(a function returning a list of arguments for prediction).
Examples
if (interactive()) {
# Launch with default models
explorapp()
# Launch with a custom SVM model
explorapp(custom_models = list(
"SVM" = list(
fn = e1071::svm,
args = list(kernel = "linear")
)
))
}