Description Usage Arguments Details Value See Also Examples
View source: R/nbc4va_internal.R
A table providing performance metrics per unique cause based on input predicted and observed cases.
1 | internalGetCauseMetrics(pred, obs, causes = unique(c(pred, obs)))
|
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. |
This code is built on the original performance metrics code provided by Dr. Mireille Gomes.
out Dataframe of a performance metrics per cause (see Methods documentation):
Columns: Cause, TruePositives, TrueNegatives, FalsePositives, FalseNegatives, PredictedFrequency, ObservedFrequency, Sensitivity, CSMFpredicted, CSMFobserved
Cause (vectorof char): The unique causes from both the obs and pred inputs
Sensitivity (vectorof double): the sensitivity for a cause
CSMFpredicted (vectorof double): the cause specific mortality fraction for a cause given the predicted deaths
CSMFobserved (vectorof double): the cause specific mortality fraction for a cause given the observed deaths
TruePositives (vectorof double): The total number of true positives per cause
TrueNegatives (vectorof double): The total number of true negatives per cause
FalsePositives (vectorof double): The total number of false positives per cause
FalseNegatives (vectorof double): The total number of false negatives per cause
PredictedFrequency (vectorof double): The occurence of a cause in the pred input
ObservedFrequency (vectorof double): The occurence of a cause in the obs input
Example:
Cause | Sensitivity | Metric-n.. |
HIV | 0.5 | #.. |
Stroke | 0.5 | #.. |
Other internal functions: internalGetCSMFAcc
,
internalGetCSMFMaxError
,
internalGetMetrics
,
internalNBC
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.