tests/testthat/_snaps/aaa-new.md

fn is validated

Code
  new_class_metric(1, "maximize")
Condition
  Error in `new_metric()`:
  ! `fn` must be a function.

direction is validated

Code
  new_class_metric(function() 1, "min")
Condition
  Error in `new_metric()`:
  ! `direction` must be one of "maximize", "minimize", or "zero", not "min".
  i Did you mean "minimize"?

metric print method works

Code
  rmse
Output
  A numeric metric | direction: minimize
Code
  roc_auc
Output
  A probability metric | direction: maximize
Code
  demographic_parity(boop)
Output
  A class metric | direction: minimize, group-wise on: boop


Try the yardstick package in your browser

Any scripts or data that you put into this service are public.

yardstick documentation built on June 22, 2024, 7:07 p.m.