Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

How to set the estimate argument correctly for roc_auc() function in yardstick package

$
0
0

I want to compute the AUC for a model.

library(yardstick)
data(two_class_example)

This code works.

roc_auc(
  two_class_example,
  truth = truth,
  Class1,
  options = list(smooth = TRUE)
)

I like to specify arguments so that my code is easier to read and debug.

roc_auc(
  two_class_example,
  truth = truth,
  estimate=Class1,
  options = list(smooth = TRUE)
)

This gives the following error

Error in metric_summarizer(metric_nm = "roc_auc", metric_fn = roc_auc_vec, : formal argument "estimate" matched by multiple actual arguments

Please explain this error. I thought the Class1 column is the vector of estimated class probabilities.


Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>