internalGetCauseMetrics: Calculate performance metrics table per cause

Description Usage Arguments Details Value See Also Examples

View source: R/nbc4va_internal.R

Description

A table providing performance metrics per unique cause based on input predicted and observed cases.

Usage

1
internalGetCauseMetrics(pred, obs, causes = unique(c(pred, obs)))

Arguments

pred

Chracter vector of predicted causes for each case.

obs

Character vector of observed causes for each case.

causes

Character vector of all possible causes including ones that are not in the pred or obs.

Details

This code is built on the original performance metrics code provided by Dr. Mireille Gomes.

Value

out Dataframe of a performance metrics per cause (see Methods documentation):

Example:

Cause Sensitivity Metric-n..
HIV 0.5 #..
Stroke 0.5 #..

See Also

Other internal functions: internalGetCSMFAcc, internalGetCSMFMaxError, internalGetMetrics, internalNBC

Examples

1
2
3
4
library(nbc4va)
pred <- c("HIV", "Stroke", "HIV", "Stroke")
obs <- c("HIV", "HIV", "Stroke", "Stroke")
cmetrics <- nbc4va:::internalGetCauseMetrics(pred, obs)

nbc4va documentation built on May 2, 2019, 1:42 p.m.