tests/testthat/_snaps/prob-average_precision.md

known corner cases are correct

Code
  out <- average_precision(df, truth, estimate)$.estimate
Condition
  Warning:
  There are `0` event cases in `truth`, results will be meaningless.
Code
  out <- average_precision(df, truth, estimate)$.estimate
Condition
  Warning:
  There are `0` event cases in `truth`, results will be meaningless.
Code
  expect <- pr_auc(df, truth, estimate)$.estimate
Condition
  Warning:
  There are `0` event cases in `truth`, results will be meaningless.

errors with class_pred input

Code
  average_precision_vec(cp_truth, estimate)
Condition
  Error in `average_precision_vec()`:
  ! `truth` should not a `class_pred` object.


Try the yardstick package in your browser

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

yardstick documentation built on April 21, 2023, 9:08 a.m.