From 1ca4ed30181a05e0b842232f85f7f3f94dc989c1 Mon Sep 17 00:00:00 2001 From: Emil Hvitfeldt Date: Thu, 18 Jan 2024 13:00:32 -0800 Subject: [PATCH 1/2] document that event_level defaults to "first" --- R/class-sens.R | 6 ++---- man/average_precision.Rd | 6 ++---- man/bal_accuracy.Rd | 6 ++---- man/classification_cost.Rd | 6 ++---- man/detection_prevalence.Rd | 6 ++---- man/f_meas.Rd | 6 ++---- man/gain_capture.Rd | 6 ++---- man/gain_curve.Rd | 6 ++---- man/j_index.Rd | 6 ++---- man/lift_curve.Rd | 6 ++---- man/mn_log_loss.Rd | 6 ++---- man/npv.Rd | 6 ++---- man/ppv.Rd | 6 ++---- man/pr_auc.Rd | 6 ++---- man/pr_curve.Rd | 6 ++---- man/precision.Rd | 6 ++---- man/recall.Rd | 6 ++---- man/roc_auc.Rd | 6 ++---- man/roc_curve.Rd | 6 ++---- man/sens.Rd | 6 ++---- man/spec.Rd | 6 ++---- man/summary.conf_mat.Rd | 6 ++---- 22 files changed, 44 insertions(+), 88 deletions(-) diff --git a/R/class-sens.R b/R/class-sens.R index 170d2620..d5f0d25e 100644 --- a/R/class-sens.R +++ b/R/class-sens.R @@ -54,10 +54,8 @@ #' #' @param event_level A single string. Either `"first"` or `"second"` to specify #' which level of `truth` to consider as the "event". This argument is only -#' applicable when `estimator = "binary"`. The default uses an -#' internal helper that generally defaults to `"first"`, however, if the -#' deprecated global option `yardstick.event_first` is set, that will be -#' used instead with a warning. +#' applicable when `estimator = "binary"`. The default uses an internal helper +#' that defaults to `"first"`. #' #' @param ... Not currently used. #' diff --git a/man/average_precision.Rd b/man/average_precision.Rd index d9f40973..1f89bad8 100644 --- a/man/average_precision.Rd +++ b/man/average_precision.Rd @@ -56,10 +56,8 @@ values should be stripped before the computation proceeds.} \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} \item{case_weights}{The optional column identifier for case weights. This should be an unquoted column name that evaluates to a numeric column diff --git a/man/bal_accuracy.Rd b/man/bal_accuracy.Rd index e7fd8b96..8587e7ae 100644 --- a/man/bal_accuracy.Rd +++ b/man/bal_accuracy.Rd @@ -63,10 +63,8 @@ in \code{data}. For \verb{_vec()} functions, a numeric vector, \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} } \value{ A \code{tibble} with columns \code{.metric}, \code{.estimator}, diff --git a/man/classification_cost.Rd b/man/classification_cost.Rd index 67bfe87b..6dad099c 100644 --- a/man/classification_cost.Rd +++ b/man/classification_cost.Rd @@ -68,10 +68,8 @@ values should be stripped before the computation proceeds.} \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} \item{case_weights}{The optional column identifier for case weights. This should be an unquoted column name that evaluates to a numeric column diff --git a/man/detection_prevalence.Rd b/man/detection_prevalence.Rd index d8d86301..fdeefc73 100644 --- a/man/detection_prevalence.Rd +++ b/man/detection_prevalence.Rd @@ -63,10 +63,8 @@ in \code{data}. For \verb{_vec()} functions, a numeric vector, \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} } \value{ A \code{tibble} with columns \code{.metric}, \code{.estimator}, diff --git a/man/f_meas.Rd b/man/f_meas.Rd index 267f2cd8..9d9c0487 100644 --- a/man/f_meas.Rd +++ b/man/f_meas.Rd @@ -70,10 +70,8 @@ in \code{data}. For \verb{_vec()} functions, a numeric vector, \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} } \value{ A \code{tibble} with columns \code{.metric}, \code{.estimator}, diff --git a/man/gain_capture.Rd b/man/gain_capture.Rd index 455c1ca2..4ccf41fa 100644 --- a/man/gain_capture.Rd +++ b/man/gain_capture.Rd @@ -56,10 +56,8 @@ values should be stripped before the computation proceeds.} \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} \item{case_weights}{The optional column identifier for case weights. This should be an unquoted column name that evaluates to a numeric column diff --git a/man/gain_curve.Rd b/man/gain_curve.Rd index d9f8e467..ced9bada 100644 --- a/man/gain_curve.Rd +++ b/man/gain_curve.Rd @@ -38,10 +38,8 @@ values should be stripped before the computation proceeds.} \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} \item{case_weights}{The optional column identifier for case weights. This should be an unquoted column name that evaluates to a numeric column diff --git a/man/j_index.Rd b/man/j_index.Rd index 958134d9..69c5b745 100644 --- a/man/j_index.Rd +++ b/man/j_index.Rd @@ -63,10 +63,8 @@ in \code{data}. For \verb{_vec()} functions, a numeric vector, \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} } \value{ A \code{tibble} with columns \code{.metric}, \code{.estimator}, diff --git a/man/lift_curve.Rd b/man/lift_curve.Rd index f056e45a..f64e8c87 100644 --- a/man/lift_curve.Rd +++ b/man/lift_curve.Rd @@ -38,10 +38,8 @@ values should be stripped before the computation proceeds.} \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} \item{case_weights}{The optional column identifier for case weights. This should be an unquoted column name that evaluates to a numeric column diff --git a/man/mn_log_loss.Rd b/man/mn_log_loss.Rd index de2011fb..3659dead 100644 --- a/man/mn_log_loss.Rd +++ b/man/mn_log_loss.Rd @@ -53,10 +53,8 @@ returned (instead of the mean value)?} \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} \item{case_weights}{The optional column identifier for case weights. This should be an unquoted column name that evaluates to a numeric column diff --git a/man/npv.Rd b/man/npv.Rd index 1c5d2e8b..ec9bb49a 100644 --- a/man/npv.Rd +++ b/man/npv.Rd @@ -68,10 +68,8 @@ in \code{data}. For \verb{_vec()} functions, a numeric vector, \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} } \value{ A \code{tibble} with columns \code{.metric}, \code{.estimator}, diff --git a/man/ppv.Rd b/man/ppv.Rd index 198b909d..fd15e751 100644 --- a/man/ppv.Rd +++ b/man/ppv.Rd @@ -68,10 +68,8 @@ in \code{data}. For \verb{_vec()} functions, a numeric vector, \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} } \value{ A \code{tibble} with columns \code{.metric}, \code{.estimator}, diff --git a/man/pr_auc.Rd b/man/pr_auc.Rd index cea04223..3d7a34ee 100644 --- a/man/pr_auc.Rd +++ b/man/pr_auc.Rd @@ -56,10 +56,8 @@ values should be stripped before the computation proceeds.} \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} \item{case_weights}{The optional column identifier for case weights. This should be an unquoted column name that evaluates to a numeric column diff --git a/man/pr_curve.Rd b/man/pr_curve.Rd index 14704c45..0771042c 100644 --- a/man/pr_curve.Rd +++ b/man/pr_curve.Rd @@ -38,10 +38,8 @@ values should be stripped before the computation proceeds.} \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} \item{case_weights}{The optional column identifier for case weights. This should be an unquoted column name that evaluates to a numeric column diff --git a/man/precision.Rd b/man/precision.Rd index e7728608..43761ea9 100644 --- a/man/precision.Rd +++ b/man/precision.Rd @@ -63,10 +63,8 @@ in \code{data}. For \verb{_vec()} functions, a numeric vector, \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} } \value{ A \code{tibble} with columns \code{.metric}, \code{.estimator}, diff --git a/man/recall.Rd b/man/recall.Rd index 2c8c57bc..f3e80541 100644 --- a/man/recall.Rd +++ b/man/recall.Rd @@ -63,10 +63,8 @@ in \code{data}. For \verb{_vec()} functions, a numeric vector, \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} } \value{ A \code{tibble} with columns \code{.metric}, \code{.estimator}, diff --git a/man/roc_auc.Rd b/man/roc_auc.Rd index 2de2a576..ed7c59f5 100644 --- a/man/roc_auc.Rd +++ b/man/roc_auc.Rd @@ -61,10 +61,8 @@ values should be stripped before the computation proceeds.} \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} \item{case_weights}{The optional column identifier for case weights. This should be an unquoted column name that evaluates to a numeric column diff --git a/man/roc_curve.Rd b/man/roc_curve.Rd index 4ff27054..3231a26f 100644 --- a/man/roc_curve.Rd +++ b/man/roc_curve.Rd @@ -39,10 +39,8 @@ values should be stripped before the computation proceeds.} \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} \item{case_weights}{The optional column identifier for case weights. This should be an unquoted column name that evaluates to a numeric column diff --git a/man/sens.Rd b/man/sens.Rd index 4f93ddb8..b0751b72 100644 --- a/man/sens.Rd +++ b/man/sens.Rd @@ -89,10 +89,8 @@ in \code{data}. For \verb{_vec()} functions, a numeric vector, \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} } \value{ A \code{tibble} with columns \code{.metric}, \code{.estimator}, diff --git a/man/spec.Rd b/man/spec.Rd index a2f93b70..b14d5206 100644 --- a/man/spec.Rd +++ b/man/spec.Rd @@ -89,10 +89,8 @@ in \code{data}. For \verb{_vec()} functions, a numeric vector, \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} } \value{ A \code{tibble} with columns \code{.metric}, \code{.estimator}, diff --git a/man/summary.conf_mat.Rd b/man/summary.conf_mat.Rd index e521844c..0c576133 100644 --- a/man/summary.conf_mat.Rd +++ b/man/summary.conf_mat.Rd @@ -31,10 +31,8 @@ for calculating multiclass metrics. The default will automatically choose \item{event_level}{A single string. Either \code{"first"} or \code{"second"} to specify which level of \code{truth} to consider as the "event". This argument is only -applicable when \code{estimator = "binary"}. The default uses an -internal helper that generally defaults to \code{"first"}, however, if the -deprecated global option \code{yardstick.event_first} is set, that will be -used instead with a warning.} +applicable when \code{estimator = "binary"}. The default uses an internal helper +that defaults to \code{"first"}.} \item{...}{Not currently used.} } From 8bb4e4564190e13e0bf35ae5225f2818e6adda3b Mon Sep 17 00:00:00 2001 From: Emil Hvitfeldt Date: Thu, 18 Jan 2024 13:01:36 -0800 Subject: [PATCH 2/2] update news --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index fdcc74c4..faf1c4d6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -22,6 +22,8 @@ calculated with `roc_auc_survival()`. * `brier_survival_integrated()` now throws an error if input data only includes 1 evalution time point. (#460) +* Clarifying documentation about how `event_level` always default to `"first`. (#432) + # yardstick 1.2.0 ## New Metrics