Learn R Programming

⚠️There's a newer version (1.2.1) of this package.Take me there.

cutpointr (version 1.1.1)

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,588

Version

1.1.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Christian Thiele

Last Published

June 29th, 2021

Functions in cutpointr (1.1.1)

abs_d_ppv_npv

Calculate the absolute difference of positive and negative predictive value
F1_score

Calculate the F1-score
add_metric

Add metrics to a cutpointr or roc_cutpointr object
auc

Calculate AUC from a roc_cutpointr or cutpointr object
abs_d_sens_spec

Calculate the absolute difference of sensitivity and specificity
Jaccard

Calculate the Jaccard Index
accuracy

Calculate accuracy
cohens_kappa

Calculate Cohen's Kappa
boot_test

Test for equivalence of a metric
maximize_gam_metric

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

Determine and evaluate optimal cutpoints
boot_ci

Calculate bootstrap confidence intervals from a cutpointr object
oc_mean

Use the sample mean as cutpoint
plot_cutpointr

General purpose plotting function for cutpointr or roc_cutpointr objects
ppv

Calculate the positive predictive value
plr

Calculate the positive or negative likelihood ratio
oc_manual

Set a manual cutpoint for use with cutpointr
plot_cut_boot

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

Calculate the false omission and false discovery rate
maximize_boot_metric

Optimize a metric function in binary classification after bootstrapping
maximize_metric

Optimize a metric function in binary classification
cutpointr_

The standard evaluation version of cutpointr (deprecated)
cutpoint

Extract the cutpoints from a ROC curve generated by cutpointr
oc_median

Use the sample median as cutpoint
oc_youden_kernel

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

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

Calculate optimal cutpoints and further statistics for multiple predictors
prod_ppv_npv

Calculate the product of positive and negative predictive value
npv

Calculate the negative predictive value
maximize_spline_metric

Optimize a metric function in binary classification after spline smoothing
maximize_loess_metric

Optimize a metric function in binary classification after LOESS smoothing
plot_metric

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

Calculate the odds ratio
plot_precision_recall

Precision recall plot from a cutpointr object
plot_roc

Plot ROC curve from a cutpointr or roc_cutpointr object
cutpoint_knots

Calculate number of knots to use in spline smoothing
metric_constrain

Metrics that are constrained by another metric
p_chisquared

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

Calculate the sum of positive and negative predictive value
prod_sens_spec

Calculate the product of sensitivity and specificity
sum_sens_spec

Calculate the sum of sensitivity and specificity
predict.cutpointr

Predict using a cutpointr object
precision

Calculate precision
roc

Calculate a ROC curve
plot_metric_boot

Plot the bootstrapped metric distribution from a cutpointr object
risk_ratio

Calculate the risk ratio (relative risk)
youden

Calculate the Youden-Index
total_utility

Calculate the total utility
misclassification_cost

Calculate the misclassification cost
tp

Extract number true / false positives / negatives
plot.cutpointr

Plot cutpointr objects
print.multi_cutpointr

Print multi_cutpointr objects
print.cutpointr

Print cutpointr objects
roc01

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

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

Calculate sensitivity
recall

Calculate recall
plot.multi_cutpointr

Plotting multi_cutpointr objects is currently not supported
plot.roc_cutpointr

Plot ROC curve from a cutpointr or roc_cutpointr object
plot_x

Plot the distribution of the independent variable per class from a cutpointr object
suicide

Suicide attempts and DSI sum scores of 532 subjects
plot_sensitivity_specificity

Sensitivity and specificity plot from a cutpointr object
specificity

Calculate specificity
tpr

Calculate true / false positive / negative rate
user_span_cutpointr

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