getperform {TSLA}R Documentation

Get performance metrics for classification

Description

Evaluate the prediction performance under the classification settings.

Usage

getperform(
  ytest,
  ypretest,
  family,
  threshold.method = c("youden", "specificity.control", "quantile"),
  specificity = NULL
)

Arguments

ytest

Response vector for test data.

ypretest

Predicted probability for test data.

family

"ls" or "logic". Return MSE when "ls" is used.

threshold.method

Method to get the threshold.

specificity

User-defined specificity or quantile.

Details

The function supports three methods to select the threshold of the predicted probability.

threshold.method = "youden": The optimal threshold corresponds to the point that maximizes the distance to the identity (diagonal) line on the ROC curve.

threshold.method = "specificity.control": The optimal threshold corresponds to the smallest value that ensures the required specificity value.

threshold.method = "quantile": The optimal threshold corresponds to the required quantile of the predicted probability.

Value

List of measures.

AUC

Area under the ROC curve.

AUPRC

Area under the precision-recall curve.

threshold

Selected threshold of the probability.

sensitivity

Sensitivity with the selected threshold.

ppv

Positive predictive value with the selected threshold.

specificity

Specificity with the selected threshold.

true.positive

Number of true positive with the selected threshold.

false.positive

Number of false positive with the selected threshold.


[Package TSLA version 0.1.2 Index]