View source: R/nbc4va_internal.R
internalGetMetrics | R Documentation |
A vector providing overall performance metrics based on input predicted and observed cases.
internalGetMetrics( pred, obs, causes = unique(c(pred, obs)), csmfa.obs = NULL, causeMetrics = internalGetCauseMetrics(pred, obs, causes) )
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. |
csmfa.obs |
A character vector of the true causes for calculating the CSMF accuracy. |
causeMetrics |
Dataframe of a performance metrics per cause (see
|
Developer Note: Depends on the internalGetCSMFAcc
function to get the CSMF Accuracy.
metrics Named numeric vector of performance metrics (see Methods documentation):
Names: TruePositives, TrueNegatives, FalsePositives, FalseNegatives, Accuracy, Sensitivity, Specificity, PCCC, CSMFMaxError, CSMFaccuracy
TruePositives (double): total number of true positives
TrueNegatives (double): total number of true negatives
FalsePositives (double): total number of false positives
FalseNegatives (double): total number of false negatives
Sensitivity (double): the overall sensitivity
PCCC (double): the partial chance corrected concordance
CSMFMaxError (double): the maximum Cause Specific Mortality Fraction Error
CSMFaccuracy (double): the Cause Specific Mortaliy Fraction accuracy
Other internal functions:
internalGetCSMFAcc()
,
internalGetCSMFMaxError()
,
internalGetCauseMetrics()
,
internalNBC()
library(nbc4va) pred <- c("HIV", "Stroke", "HIV", "Stroke") obs <- c("HIV", "HIV", "Stroke", "Stroke") metrics <- nbc4va::internalGetMetrics(pred, obs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.