print.nbc_summary: Print top predicted causes from a NBC model

View source: R/nbc4va_main.R

print.nbc_summaryR Documentation

Print top predicted causes from a NBC model

Description

Prints a summary message from a summary.nbc object of the top causes by probability or predicted Cause Specific Mortality Fraction (CSMF).

printnbcex.png

Usage

## S3 method for class 'nbc_summary'
print(x, ...)

Arguments

x

A summary.nbc object.

...

Additional arguments to be passed if applicable.

Details

See Methods documentation for details on CSMF and probability from the Naive Bayes Classifier.

Value

Prints a summary of the top causes of death by probability for the NBC model.

See Also

Other main functions: nbc(), plot.nbc(), summary.nbc()

Examples

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)

# Print a summary of all the test data for the top 3 causes by predicted CSMF
brief <- summary(results, top=3)
print(brief)


rrwen/nbc4va documentation built on May 11, 2022, 9:45 p.m.