holdOutPredictions: Extract the held out predictions of a 'trainOcc' object. .

Description Usage Arguments Value Examples

Description

If both modParam, and modRow are NULL the held-out predictions of the final model is returned.

Usage

1
2
holdOutPredictions(x, modParam = NULL, modRow = NULL, modRank = NULL,
  by = NULL, partition = "all", aggregate = FALSE)

Arguments

x

a trainOcc or train object.

modParam

data frame with the parameters of the model.

modRow

the row or index of the model in the model-selection table.

modRank

the rank of the model after sorting by by. this table is located in x$train$results/x$results).

by

a character or character vector specifying by which columns to sort. If NULL the performance metric is taken from the train object.

partition

The default 'all' is to return all held out samples of the particular model, but a particular partition can be specified by its name (one of the sorted unique values in x$train$pred), or an integer (giving the index in the unique values in x$train$pred).

aggregate

default FALSE...

Value

held-out predicted decision values in a list with the elemetns $pos (positive held out predictions) and $un (unlabeled held out predictions). $pos and $un can be lists again depending on the resampling methods.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(bananas)
oc <- trainOcc(x = bananas$tr[, -1], y = bananas$tr[, 1], 
               tuneGrid=expand.grid(sigma=c(.1, 1, 10), 
                                     cNeg=0.0625, 
                                     cMultiplier=64))
### hold-out predictions of the selected model
hop <- holdOutPredictions(oc)
### extract the hold-out samples of a model corresponding to 
### a aspecific row of the results table, returned when 
### printing a \'trainOcc\' object. 
hop <- holdOutPredictions(oc, modRow=3)
### extract the hold-out predictions of a partition
hop <- holdOutPredictions(oc, partition=3) 

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