get_score: Calculate Score from Risk Probability

View source: R/helpers.R

get_scoreR Documentation

Calculate Score from Risk Probability

Description

Returns the score(s) for the provided risk probabilities.

Usage

get_score(object, risk)

Arguments

object

An object of class "risk_mod", usually a result of a call to risk_mod().

risk

Numeric vector with probability value(s).

Value

Numeric vector with the same length as risk.

Examples

y <- breastcancer[[1]]
X <- as.matrix(breastcancer[,2:ncol(breastcancer)])

mod <- risk_mod(X, y)
get_score(mod, risk = c(0.25, 0.50, 0.75))


riskscores documentation built on June 8, 2025, 10:27 a.m.