topCOD.nbc: Cause of death predictions from a NBC model

Description Usage Arguments Value See Also Examples

View source: R/nbc4va_wrapper.R

Description

Obtains the top causes of deaths for each testing case from a result nbc object.

Usage

1
topCOD.nbc(object)

Arguments

object

The result nbc object.

Value

out A dataframe of the top CODs:

See Also

Other wrapper functions: csmf.nbc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(nbc4va)
data(nbc4vaData)

# Run naive bayes classifier on random train and test data
train <- nbc4vaData[1:50, ]
test <- nbc4vaData[51:100, ]
results <- nbc(train, test)

# Obtain the top cause of death predictions for the test data
topPreds <- topCOD.nbc(results)

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