View source: R/partial_areas.R
pauc | R Documentation |
Calculates area under curve curve in an specific TPR or FPR region.
pauc(
data = NULL,
response,
predictor,
ratio,
lower_threshold,
upper_threshold,
.condition = NULL
)
data |
A data.frame or extension (e.g. a tibble) containing values for predictors and response variables. |
response |
A data variable which must be a factor, integer or character vector representing the prediction outcome on each observation (Gold Standard). If the variable presents more than two possible outcomes, classes or categories:
New combined category represents the "absence" of the condition to predict.
See |
predictor |
A data variable which must be numeric, representing values of a classifier or predictor for each observation. |
ratio |
Ratio or axis where to apply calculations.
|
lower_threshold , upper_threshold |
Two numbers between 0 and 1, inclusive. These numbers represent lower and upper bounds of the region where to apply calculations. |
.condition |
A value from response that represents class, category or condition of interest which wants to be predicted. If Once the class of interest is selected, rest of them will be collapsed in a common category, representing the "absence" of the condition to be predicted. See |
A numeric value representing the area under ROC curve in the specified region.
# Calculate pauc of Sepal.Width as a classifier of setosa species in
# in TPR = (0.9, 1)
pauc(
iris,
response = Species,
predictor = Sepal.Width,
ratio = "tpr",
lower_threshold = 0.9,
upper_threshold = 1
)
# Calculate pauc of Sepal.Width as a classifier of setosa species in
# in FPR = (0, 0.1)
pauc(
iris,
response = Species,
predictor = Sepal.Width,
ratio = "fpr",
lower_threshold = 0,
upper_threshold = 0.1
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.