Learn R Programming

nbc4va (version 1.2)

print.nbc_summary: 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).

Usage

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

Arguments

x

A summary.nbc object.

...

Additional arguments to be passed if applicable.

Value

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

Details

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

See Also

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

Examples

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab