Learn R Programming

cutpointr (version 1.1.2)

Determine and Evaluate Optimal Cutpoints in Binary Classification Tasks

Description

Estimate cutpoints that optimize a specified metric in binary classification tasks and validate performance using bootstrapping. Some methods for more robust cutpoint estimation are supported, e.g. a parametric method assuming normal distributions, bootstrapped cutpoints, and smoothing of the metric values per cutpoint using Generalized Additive Models. Various plotting functions are included. For an overview of the package see Thiele and Hirschfeld (2021) .

Copy Link

Version

Install

install.packages('cutpointr')

Monthly Downloads

1,357

Version

1.1.2

License

GPL-3

Issues

Pull Requests

Stars

Forks

Last Published

April 13th, 2022

Functions in cutpointr (1.1.2)

add_metric

Add metrics to a cutpointr or roc_cutpointr object
cohens_kappa

Calculate Cohen's Kappa
abs_d_sens_spec

Calculate the absolute difference of sensitivity and specificity
boot_ci

Calculate bootstrap confidence intervals from a cutpointr object
auc

Calculate AUC from a roc_cutpointr or cutpointr object
accuracy

Calculate accuracy
boot_test

Test for equivalence of a metric
F1_score

Calculate the F1-score
abs_d_ppv_npv

Calculate the absolute difference of positive and negative predictive value
Jaccard

Calculate the Jaccard Index
cutpoint

Extract the cutpoints from a ROC curve generated by cutpointr
maximize_gam_metric

Optimize a metric function in binary classification after smoothing via generalized additive models
maximize_boot_metric

Optimize a metric function in binary classification after bootstrapping
false_omission_rate

Calculate the false omission and false discovery rate
cutpointr_

The standard evaluation version of cutpointr (deprecated)
cutpointr

Determine and evaluate optimal cutpoints
npv

Calculate the negative predictive value
maximize_loess_metric

Optimize a metric function in binary classification after LOESS smoothing
multi_cutpointr

Calculate optimal cutpoints and further statistics for multiple predictors
oc_youden_normal

Determine an optimal cutpoint for the Youden-Index assuming normal distributions
p_chisquared

Calculate the p-value of a chi-squared test
odds_ratio

Calculate the odds ratio
plot.multi_cutpointr

Plotting multi_cutpointr objects is currently not supported
plot.roc_cutpointr

Plot ROC curve from a cutpointr or roc_cutpointr object
maximize_metric

Optimize a metric function in binary classification
metric_constrain

Metrics that are constrained by another metric
oc_median

Use the sample median as cutpoint
plot_cut_boot

Plot the bootstrapped distribution of optimal cutpoints from a cutpointr object
maximize_spline_metric

Optimize a metric function in binary classification after spline smoothing
misclassification_cost

Calculate the misclassification cost
plot.cutpointr

Plot cutpointr objects
cutpoint_knots

Calculate number of knots to use in spline smoothing
plr

Calculate the positive or negative likelihood ratio
plot_precision_recall

Precision recall plot from a cutpointr object
oc_youden_kernel

Determine an optimal cutpoint maximizing the Youden-Index based on kernel smoothed densities
plot_sensitivity_specificity

Sensitivity and specificity plot from a cutpointr object
plot_cutpointr

General purpose plotting function for cutpointr or roc_cutpointr objects
plot_x

Plot the distribution of the independent variable per class from a cutpointr object
print.multi_cutpointr

Print multi_cutpointr objects
risk_ratio

Calculate the risk ratio (relative risk)
print.cutpointr

Print cutpointr objects
plot_roc

Plot ROC curve from a cutpointr or roc_cutpointr object
sum_ppv_npv

Calculate the sum of positive and negative predictive value
roc01

Calculate the distance between points on the ROC curve and (0,1)
sum_sens_spec

Calculate the sum of sensitivity and specificity
ppv

Calculate the positive predictive value
prod_ppv_npv

Calculate the product of positive and negative predictive value
youden

Calculate the Youden-Index
sensitivity

Calculate sensitivity
suicide

Suicide attempts and DSI sum scores of 532 subjects
specificity

Calculate specificity
precision

Calculate precision
predict.cutpointr

Predict using a cutpointr object
prod_sens_spec

Calculate the product of sensitivity and specificity
user_span_cutpointr

Calculate bandwidth for LOESS smoothing of metric functions by rule of thumb
tpr

Calculate true / false positive / negative rate
roc

Calculate a ROC curve
total_utility

Calculate the total utility
tp

Extract number true / false positives / negatives
plot_metric_boot

Plot the bootstrapped metric distribution from a cutpointr object
oc_mean

Use the sample mean as cutpoint
oc_manual

Set a manual cutpoint for use with cutpointr
plot_metric

Plot a metric over all possible cutoffs from a cutpointr object
prostate_nodal

Nodal involvement and acid phosphatase levels in 53 prostate cancer patients
recall

Calculate recall