diff-methods: Model Performance Differences

Description Usage Arguments Value See Also Examples

Description

Pairwise model differences in resampled performance metrics.

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'MLModel'
diff(x, ...)

## S3 method for class 'Performance'
diff(x, ...)

## S3 method for class 'Resamples'
diff(x, ...)

Arguments

x

model performance or resample result.

...

arguments passed to other methods.

Value

PerformanceDiff class object that inherits from Performance.

See Also

t.test, plot, summary

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Requires prior installation of suggested package gbm to run

## Survival response example
library(survival)

fo <- Surv(time, status) ~ .
control <- CVControl()

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

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

MachineShop documentation built on June 18, 2021, 9:06 a.m.