From 713a3a689227059b75a124af7c0aaa36493a2d36 Mon Sep 17 00:00:00 2001 From: overdodactyl Date: Thu, 4 Jan 2024 22:43:08 -0700 Subject: [PATCH] feat: add fall out alias for FPR --- R/dx_metrics.R | 6 +++++- man/{dx_fpr.Rd => fpr.Rd} | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) rename man/{dx_fpr.Rd => fpr.Rd} (95%) diff --git a/R/dx_metrics.R b/R/dx_metrics.R index 7362b17..0cccc55 100644 --- a/R/dx_metrics.R +++ b/R/dx_metrics.R @@ -179,7 +179,8 @@ dx_fnr <- function(cm, detail = "full", ...) { #' #' The formula for FPR is: #' \deqn{FPR = \frac{False Positives}{False Positives + True Negatives}}{FPR = FP / (FP + TN)} -#' +#' @aliases dx_fall_out +#' @name fpr #' @examples #' cm <- dx_cm(dx_heart_failure$predicted, dx_heart_failure$truth, threshold = #' 0.5, poslabel = 1) @@ -195,6 +196,9 @@ dx_fpr <- function(cm, detail = "full", ...) { metric_binomial(cm$fp, cm$disneg, name = "False Positive Rate", detail = detail, ...) } +#' @rdname fpr +dx_fall_out <- dx_fpr + #' Calculate False Discovery Rate (FDR) #' #' Calculates the False Discovery Rate (FDR), which is the proportion of false positives diff --git a/man/dx_fpr.Rd b/man/fpr.Rd similarity index 95% rename from man/dx_fpr.Rd rename to man/fpr.Rd index b332bd3..5436b07 100644 --- a/man/dx_fpr.Rd +++ b/man/fpr.Rd @@ -1,10 +1,14 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/dx_metrics.R -\name{dx_fpr} +\name{fpr} +\alias{fpr} \alias{dx_fpr} +\alias{dx_fall_out} \title{Calculate False Positive Rate (FPR)} \usage{ dx_fpr(cm, detail = "full", ...) + +dx_fall_out(cm, detail = "full", ...) } \arguments{ \item{cm}{A dx_cm object created by \code{\link{dx_cm}}.}