Tidymodels Setting "metric_set" in workflow warnings about KAPPA


I am trying get a number of performance metrics from a model based on cross validation using the code below

tree_res <- 
  tree_wf %>% 
    resamples = report_resamples,
    grid = tree_grid,
    perf = metric_set("roc_auc", "sens", "spec", "kap", "accuracy")

It returns results for the AUC and the accuracy but tells me that

The ... are not used in this function but one or more objects were passed: 'perf'

Has anyone seen something like this before?
Am i using it incorrectly?


The metric names should not be quoted:

> library(yardstick)
For binary classification, the first factor level is assumed to be the event.
Use the argument `event_level = "second"` to alter this as needed.
> metric_set("roc_auc", "sens", "spec", "kap", "accuracy")
Error: All inputs to `metric_set()` must be functions. These inputs are not: (1, 2, 3, 4, 5).
> metric_set(roc_auc, sens, spec, kap, accuracy)
    metric        class direction
1  roc_auc  prob_metric  maximize
2     sens class_metric  maximize
3     spec class_metric  maximize
4      kap class_metric  maximize
5 accuracy class_metric  maximize
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.