Learn R Programming

MachineShop (version 2.0.0)

summary: Model Performance Summaries

Description

Summary statistics for resampled model performance metrics.

Usage

# S3 method for ConfusionList
summary(object, ...)

# S3 method for ConfusionMatrix summary(object, ...)

# S3 method for Curves summary(object, stat = MachineShop::settings("stat.Curves"), ...)

# S3 method for MLModel summary( object, stats = MachineShop::settings("stats.Resamples"), na.rm = TRUE, ... )

# S3 method for Performance summary( object, stats = MachineShop::settings("stats.Resamples"), na.rm = TRUE, ... )

# S3 method for Resamples summary( object, stats = MachineShop::settings("stats.Resamples"), na.rm = TRUE, ... )

Arguments

object

confusion, performance curve, lift, trained model fit, performance, or resample result.

...

arguments passed to other methods.

stat

function or character string naming a function to compute a summary statistic at each cutoff value of resampled metrics in Curves, or NULL for resample-specific metrics.

stats

function, function name, or vector of these with which to compute summary statistics.

na.rm

logical indicating whether to exclude missing values.

Value

An object of summmary statistics.

Examples

Run this code
# NOT RUN {
## Factor response example

fo <- Species ~ .
control <- CVControl()

gbm_res1 <- resample(fo, iris, GBMModel(n.trees = 25), control)
gbm_res2 <- resample(fo, iris, GBMModel(n.trees = 50), control)
gbm_res3 <- resample(fo, iris, GBMModel(n.trees = 100), control)
summary(gbm_res3)

res <- c(GBM1 = gbm_res1, GBM2 = gbm_res2, GBM3 = gbm_res3)
summary(res)

# }

Run the code above in your browser using DataLab