Learn R Programming

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

cutpointr (version 0.7.3)

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

Version

0.7.3

License

GPL-3

Maintainer

Christian Thiele

Last Published

April 13th, 2018

Functions in cutpointr (0.7.3)

cohens_kappa

Calculate Cohen's Kappa
print.cutpointr

Print cutpointr objects
multi_cutpointr

Calculate optimal cutpoints and further statistics for multiple predictors
npv

Calculate the negative predictive value
cutpoint_knots

Calculate number of knots to use in spline smoothing
false_omission_rate

Calculate the false omission and false discovery rate
maximize_spline_metric

Optimize a metric function in binary classification after spline smoothing
misclassification_cost

Calculate the misclassification cost
plot_cut_boot

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

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

Determine and evaluate optimal cutpoints
maximize_loess_metric

Optimize a metric function in binary classification after LOESS smoothing
maximize_metric

Optimize a metric function in binary classification
print.multi_cutpointr

Print multi_cutpointr objects
plot.cutpointr

Plot cutpointr objects
plot_cutpointr

General purpose plotting function for cutpointr or roc_cutpointr objects
plot_metric

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

Calculate the positive or negative likelihood ratio
plot_metric_boot

Plot the bootstrapped metric distribution from a cutpointr object
plot_precision_recall

Precision recall plot from a cutpointr object
abs_d_sens_spec

Calculate the absolute difference of sensitivity and specificity
accuracy

Calculate accuracy
precision

Calculate precision
plot_roc

Plot ROC curve from a cutpointr object
sum_sens_spec

Calculate the sum of sensitivity and specificity
ppv

Calculate the positive predictive value
sum_ppv_npv

Calculate the sum of positive and negative predictive value
oc_manual

Set a manual cutpoint for use with cutpointr
roc

Calculate a ROC curve
specificity

Calculate specificity
tpr

Calculate true / false positive / negative rate
suicide

Suicide attempts and DSI sum scores of 532 subjects
oc_mean

Use the sample mean as cutpoint
predict.cutpointr

Predict using a cutpointr object
user_span_cutpointr

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

Calculate the product of positive and negative predictive value
oc_median

Use the sample median as cutpoint
sensitivity

Calculate sensitivity
total_utility

Calculate the total utility
prod_sens_spec

Calculate the product of sensitivity and specificity
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_x

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

Extract number true / false positives / negatives
recall

Calculate recall
youden

Calculate the Youden-Index
risk_ratio

Calculate the risk ratio (relative risk)
cutpoint

Extract the cutpoints from a ROC curve generated by cutpointr
maximize_boot_metric

Optimize a metric function in binary classification after bootstrapping
maximize_gam_metric

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

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

Calculate the F1-score
odds_ratio

Calculate the odds ratio
abs_d_ppv_npv

Calculate the absolute difference of positive and negative predictive value
cutpointr_

The standard evaluation version of cutpointr