Learn R Programming

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

cutpointr (version 1.0.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 and various plotting functions are included.

Copy Link

Version

Install

install.packages('cutpointr')

Monthly Downloads

1,770

Version

1.0.2

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Christian Thiele

Last Published

April 14th, 2020

Functions in cutpointr (1.0.2)

cutpoint

Extract the cutpoints from a ROC curve generated by cutpointr
cutpoint_knots

Calculate number of knots to use in spline smoothing
abs_d_sens_spec

Calculate the absolute difference of sensitivity and specificity
false_omission_rate

Calculate the false omission and false discovery rate
misclassification_cost

Calculate the misclassification cost
plot_metric

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

Metrics that are constrained by another metric
plot_metric_boot

Plot the bootstrapped metric distribution from a cutpointr object
maximize_gam_metric

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

Calculate recall
print.multi_cutpointr

Print multi_cutpointr objects
prostate_nodal

Nodal involvement and acid phosphatase levels in 53 prostate cancer patients
print.cutpointr

Print cutpointr objects
maximize_loess_metric

Optimize a metric function in binary classification after LOESS smoothing
maximize_metric

Optimize a metric function in binary classification
maximize_spline_metric

Optimize a metric function in binary classification after spline smoothing
cutpointr

Determine and evaluate optimal cutpoints
maximize_boot_metric

Optimize a metric function in binary classification after bootstrapping
plot_roc

Plot ROC curve from a cutpointr or roc_cutpointr object
oc_youden_kernel

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

Precision recall plot from a cutpointr object
ppv

Calculate the positive predictive value
plr

Calculate the positive or negative likelihood ratio
oc_median

Use the sample median as cutpoint
roc01

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

Calculate sensitivity
youden

Calculate the Youden-Index
total_utility

Calculate the total utility
cutpointr_

The standard evaluation version of cutpointr (deprecated)
multi_cutpointr

Calculate optimal cutpoints and further statistics for multiple predictors
tp

Extract number true / false positives / negatives
oc_youden_normal

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

Calculate the product of positive and negative predictive value
plot_cutpointr

General purpose plotting function for cutpointr or roc_cutpointr objects
prod_sens_spec

Calculate the product of sensitivity and specificity
plot_cut_boot

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

Calculate the odds ratio
npv

Calculate the negative predictive value
sum_ppv_npv

Calculate the sum of positive and negative predictive value
p_chisquared

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

Calculate the sum of sensitivity and specificity
plot.cutpointr

Plot cutpointr objects
predict.cutpointr

Predict using a cutpointr object
risk_ratio

Calculate the risk ratio (relative risk)
precision

Calculate precision
oc_mean

Use the sample mean as cutpoint
roc

Calculate a ROC curve
plot.multi_cutpointr

Plotting multi_cutpointr objects is currently not supported
oc_manual

Set a manual cutpoint for use with cutpointr
plot.roc_cutpointr

Plot ROC curve from a cutpointr or roc_cutpointr object
specificity

Calculate specificity
plot_sensitivity_specificity

Sensitivity and specificity plot from a cutpointr object
plot_x

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

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

Calculate true / false positive / negative rate
suicide

Suicide attempts and DSI sum scores of 532 subjects
Jaccard

Calculate the Jaccard Index
boot_test

Test for equivalence of a metric
abs_d_ppv_npv

Calculate the absolute difference of positive and negative predictive value
accuracy

Calculate accuracy
boot_ci

Calculate bootstrap confidence intervals from a cutpointr object
auc

Calculate AUC from a roc_cutpointr or cutpointr object
cohens_kappa

Calculate Cohen's Kappa
F1_score

Calculate the F1-score
add_metric

Add metrics to a cutpointr or roc_cutpointr object