fnc: Calculate the false negative count of a vector of predicted...

View source: R/fnc.R

fncR Documentation

Calculate the false negative count of a vector of predicted probabilities against a binary outcome at a given threshold.

Description

Calculate the false negative count of a vector of predicted probabilities against a binary outcome at a given threshold.

Usage

fnc(preds, obs, thresh = 0.5)

Arguments

preds

A vector of predicted probabilities.

obs

A vector containing the observed binary outcomes (0 or 1).

thresh

The probability threshold at or above which a prediction is considered to be positive.

Value

The false negative count is the number of observations predicted as negative that are in fact positive

Examples

# Generate some predictions
predictions <- runif(1000)
# Generate some binary outcomes
observations <- sample(0:1, size = 1000, replace = TRUE)
# Calculate the false negative count
fnc(predictions, observations)

gweissman/gmish documentation built on Feb. 16, 2025, 8:38 a.m.