Learn R Programming

Tariff (version 1.0.5)

summary.tariff: Summary of the results obtained from Tariff algorithm

Description

This function prints the summary message of the fitted results.

Usage

# S3 method for tariff
summary(object, top = 5, id = NULL, ...)

Arguments

object

fitted object from tariff

top

number of top CSMF to show

id

the ID of a specific death to show

...

not used

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
data("RandomVA3")
test <- RandomVA3[1:200, ]
train <- RandomVA3[201:400, ]
allcauses <- unique(train$cause)
fit <- tariff(causes.train = "cause", symps.train = train, 
			symps.test = test, causes.table = allcauses)
correct <- which(fit$causes.test[,2] == test$cause)
accuracy <- length(correct) / dim(test)[1]
summary(fit)
summary(fit, top = 10)
summary(fit, id = "p849", top = 3)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab