Learn R Programming

predictNMB (version 0.2.1)

evaluate_cutpoint_nmb: Evaluates a cutpoint by returning the mean NMB per sample.

Description

Evaluates a cutpoint by returning the mean NMB per sample.

Usage

evaluate_cutpoint_nmb(predicted, actual, pt, nmb)

Value

Returns a numeric value representing the NMB for that cutpoint and data.

Arguments

predicted

A vector of predicted probabilities.

actual

A vector of actual outcomes.

pt

The probability threshold to be evaluated.

nmb

A named vector containing NMB assigned to each classification.

Examples

Run this code
evaluate_cutpoint_nmb(
  predicted = runif(1000),
  actual = sample(c(0, 1), size = 1000, replace = TRUE),
  pt = 0.1,
  nmb = c("TP" = -3, "TN" = 0, "FP" = -1, "FN" = -4)
)

Run the code above in your browser using DataLab