Package: cutpointr 1.1.2

cutpointr: Determine and Evaluate Optimal Cutpoints in Binary Classification Tasks

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) <doi:10.18637/jss.v098.i11>.

Authors:Christian Thiele [cre, aut]

cutpointr_1.1.2.tar.gz
cutpointr_1.1.2.zip(r-4.5)cutpointr_1.1.2.zip(r-4.4)cutpointr_1.1.2.zip(r-4.3)
cutpointr_1.1.2.tgz(r-4.4-x86_64)cutpointr_1.1.2.tgz(r-4.4-arm64)cutpointr_1.1.2.tgz(r-4.3-x86_64)cutpointr_1.1.2.tgz(r-4.3-arm64)
cutpointr_1.1.2.tar.gz(r-4.5-noble)cutpointr_1.1.2.tar.gz(r-4.4-noble)
cutpointr_1.1.2.tgz(r-4.4-emscripten)cutpointr_1.1.2.tgz(r-4.3-emscripten)
cutpointr.pdf |cutpointr.html
cutpointr/json (API)
NEWS

# Install 'cutpointr' in R:
install.packages('cutpointr', repos = c('https://thie1e.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/thie1e/cutpointr/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • prostate_nodal - Nodal involvement and acid phosphatase levels in 53 prostate cancer patients
  • suicide - Suicide attempts and DSI sum scores of 532 subjects

On CRAN:

bootstrappingcutpoint-optimizationroc-curve

10.16 score 86 stars 1 packages 262 scripts 1.2k downloads 11 mentions 73 exports 41 dependencies

Last updated 3 years agofrom:b84a39cc88. Checks:OK: 1 NOTE: 8. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 19 2024
R-4.5-win-x86_64NOTENov 19 2024
R-4.5-linux-x86_64NOTENov 19 2024
R-4.4-win-x86_64NOTENov 19 2024
R-4.4-mac-x86_64NOTENov 19 2024
R-4.4-mac-aarch64NOTENov 19 2024
R-4.3-win-x86_64NOTENov 19 2024
R-4.3-mac-x86_64NOTENov 19 2024
R-4.3-mac-aarch64NOTENov 19 2024

Exports:abs_d_ppv_npvabs_d_sens_specacc_constrainaccuracyadd_metricaucboot_ciboot_testcohens_kappacutpointcutpoint_knotscutpointrcutpointr_cutpointsF1_scorefalse_discovery_ratefalse_omission_ratefnfnrfpfprJaccardmaximize_boot_metricmaximize_gam_metricmaximize_loess_metricmaximize_metricmaximize_spline_metricmetric_constrainminimize_boot_metricminimize_gam_metricminimize_loess_metricminimize_metricminimize_spline_metricmisclassification_costmulti_cutpointrnlrnpvoc_manualoc_meanoc_medianoc_youden_kerneloc_youden_normalodds_ratiop_chisquaredplot_cut_bootplot_cutpointrplot_metricplot_metric_bootplot_precision_recallplot_rocplot_sensitivity_specificityplot_xplrppvprecisionprod_ppv_npvprod_sens_specrecallrisk_ratiorocroc01sens_constrainsensitivityspec_constrainspecificitysum_ppv_npvsum_sens_spectntnrtotal_utilitytptpryouden

Dependencies:clicodetoolscolorspacecpp11dplyrfansifarverforeachgenericsggplot2gluegridExtragtableisobanditeratorslabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigpurrrR6RColorBrewerRcpprlangscalesstringistringrtibbletidyrtidyselectutf8vctrsviridisLitewithr

An introduction to cutpointr

Rendered fromcutpointr.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2022-04-13
Started: 2017-04-07

cutpointr: Bootstrapping

Rendered fromcutpointr_bootstrapping.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2022-04-13
Started: 2022-01-18

cutpointr benchmarks

Rendered fromcutpointr_benchmarks.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2022-04-13
Started: 2022-01-18

Plotting with cutpointr

Rendered fromcutpointr_plotting.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2022-04-13
Started: 2022-01-18

Robust cutpoint estimation

Rendered fromcutpointr_estimation.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2022-01-18
Started: 2022-01-18

ROC curves with cutpointr

Rendered fromcutpointr_roc.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2022-04-13
Started: 2022-01-18

User-defined functions for estimation methods and metrics

Rendered fromcutpointr_user_functions.Rmdusingknitr::rmarkdownon Nov 19 2024.

Last update: 2022-04-13
Started: 2022-01-18

Readme and manuals

Help Manual

Help pageTopics
Calculate the absolute difference of positive and negative predictive valueabs_d_ppv_npv
Calculate the absolute difference of sensitivity and specificityabs_d_sens_spec
Calculate accuracyaccuracy
Add metrics to a cutpointr or roc_cutpointr objectadd_metric add_metric.cutpointr add_metric.multi_cutpointr add_metric.roc_cutpointr
Calculate AUC from a roc_cutpointr or cutpointr objectauc auc.cutpointr auc.roc_cutpointr
Calculate bootstrap confidence intervals from a cutpointr objectboot_ci
Test for equivalence of a metricboot_test
Calculate Cohen's Kappacohens_kappa
Extract the cutpoints from a ROC curve generated by cutpointrcutpoint cutpoints
Calculate number of knots to use in spline smoothingcutpoint_knots
Determine and evaluate optimal cutpointscutpointr cutpointr.default cutpointr.numeric
The standard evaluation version of cutpointr (deprecated)cutpointr_
Calculate the F1-scoreF1_score
Calculate the false omission and false discovery ratefalse_discovery_rate false_omission_rate
Calculate the Jaccard IndexJaccard
Optimize a metric function in binary classification after bootstrappingmaximize_boot_metric minimize_boot_metric
Optimize a metric function in binary classification after smoothing via generalized additive modelsmaximize_gam_metric minimize_gam_metric
Optimize a metric function in binary classification after LOESS smoothingmaximize_loess_metric minimize_loess_metric
Optimize a metric function in binary classificationmaximize_metric minimize_metric
Optimize a metric function in binary classification after spline smoothingmaximize_spline_metric minimize_spline_metric
Metrics that are constrained by another metricacc_constrain metric_constrain sens_constrain spec_constrain
Calculate the misclassification costmisclassification_cost
Calculate optimal cutpoints and further statistics for multiple predictorsmulti_cutpointr
Calculate the negative predictive valuenpv
Set a manual cutpoint for use with cutpointroc_manual
Use the sample mean as cutpointoc_mean
Use the sample median as cutpointoc_median
Determine an optimal cutpoint maximizing the Youden-Index based on kernel smoothed densitiesoc_youden_kernel
Determine an optimal cutpoint for the Youden-Index assuming normal distributionsoc_youden_normal
Calculate the odds ratioodds_ratio
Calculate the p-value of a chi-squared testp_chisquared
Plot the bootstrapped distribution of optimal cutpoints from a cutpointr objectplot_cut_boot
General purpose plotting function for cutpointr or roc_cutpointr objectsplot_cutpointr
Plot a metric over all possible cutoffs from a cutpointr objectplot_metric
Plot the bootstrapped metric distribution from a cutpointr objectplot_metric_boot
Precision recall plot from a cutpointr objectplot_precision_recall
Plot ROC curve from a cutpointr or roc_cutpointr objectplot_roc plot_roc.cutpointr plot_roc.roc_cutpointr
Sensitivity and specificity plot from a cutpointr objectplot_sensitivity_specificity
Plot the distribution of the independent variable per class from a cutpointr objectplot_x
Plot cutpointr objectsplot.cutpointr
Plotting multi_cutpointr objects is currently not supportedplot.multi_cutpointr
Plot ROC curve from a cutpointr or roc_cutpointr objectplot.roc_cutpointr
Calculate the positive or negative likelihood rationlr plr
Calculate the positive predictive valueppv
Calculate precisionprecision
Predict using a cutpointr objectpredict.cutpointr
Print cutpointr objectsprint.cutpointr
Print multi_cutpointr objectsprint.multi_cutpointr
Calculate the product of positive and negative predictive valueprod_ppv_npv
Calculate the product of sensitivity and specificityprod_sens_spec
Nodal involvement and acid phosphatase levels in 53 prostate cancer patientsprostate_nodal
Calculate recallrecall
Calculate the risk ratio (relative risk)risk_ratio
Calculate a ROC curveroc
Calculate the distance between points on the ROC curve and (0,1)roc01
Calculate sensitivitysensitivity
Calculate specificityspecificity
Suicide attempts and DSI sum scores of 532 subjectssuicide
Calculate the sum of positive and negative predictive valuesum_ppv_npv
Calculate the sum of sensitivity and specificitysum_sens_spec
Calculate the total utilitytotal_utility
Extract number true / false positives / negativesfn fp tn tp
Calculate true / false positive / negative ratefnr fpr tnr tpr
Calculate bandwidth for LOESS smoothing of metric functions by rule of thumbuser_span_cutpointr
Calculate the Youden-Indexyouden