resamples: Collation and Visualization of Resampling Results (Models of...

Description Usage Arguments Examples

Description

The function returns an object of class resamples as does the function resamples.default (see resamples). resamples.default can be used to collect, analyze, and visualize a resampling results of the final models from a list of train objects. Instead, resamples.trainOcc collects resampling results of different models from the same method stored in one trainOcc object. This is useful due to the fact that the metrics used for model selection are derived from positive and unlabeled data and always have to be treated with caution.

Usage

1
2
3
## S3 method for class 'trainOcc'
resamples(x, modParam = NULL, modRow = NULL,
  modRank = NULL, metric = NULL, ...)

Arguments

x

an object of class trainOcc.

modParam

a data frame with the desired modParameters.

modRow

the index of the model, i.e. the row in the object$results table.

modRank

the model at the modelRank-th position after sorting after the performance metric. The performance metric can be specified by by.

metric

if modRank is used, which metric should be used for the ranking?

...

...

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
data(bananas)
oc <- trainOcc(x=bananas$tr[, -1], y=bananas$tr[, 1], 
               tuneGrid=expand.grid(sigma=c(0.1,1), ### not so large grid
                                    cNeg=2^seq(-5, 10, 3), 
                                    cMultiplier=2^seq(4, 15, 2)))
# visualize resamples of the ten models with highest (mean) puAuc values
resamps <- resamples(oc, modRank=1:10, metric="puAuc")
bwplot (resamps, metric='puF')

## End(Not run)

benmack/oneClass documentation built on Dec. 15, 2020, 7:38 p.m.