Skip to contents

Plot gridsearch performance metrics

Usage

plot_tuning(
  train,
  test,
  bf,
  cor_threshold,
  cor_metric = "min_dist_cor",
  use = "test"
)

Arguments

train

training statistics data frame

test

test statistics data frame

bf

bird flow model

cor_threshold

correlation threshold used when selecting models

cor_metric

correlation metrics used when selecting models

use

"test" or "train" to indicate what statistics to use in the plot

Value

A ggplot2 plot object

Examples


files <- c("sstspa_model.hdf5", "sstspa_test_metrics.rds", "sstspa_train_metrics.rds")
paths <- lapply(paste0("rmd/example_data/", files), function(x) system.file(x, package = "BirdFlowPipeline"))
names(paths) <- c("model", "test_metrics", "train_metrics")
bf <- import_birdflow(paths$model)
#> Error in import_birdflow(paths$model): could not find function "import_birdflow"
test_metrics <- readRDS(paths$test_metrics)
train_metrics <- readRDS(paths$train_metrics)

plot_tuning(train = train_metrics, test = test_metrics, bf, 0.9 )
#> Error: object 'bf' not found