dataForSummaryFunction: dataForSummaryFunction

Description Usage Arguments Value Examples

View source: R/dataForSummaryFunction.R

Description

Creates a data frame from an object of class holdOutPredictions that can be passsed to the data argument of puSummary function.

Usage

1
dataForSummaryFunction(x, threshold = 0, newUn = NULL, ...)

Arguments

x

an object of class holdOutPredictions or trainOcc

threshold

threshold used to binarize the data

newUn

predictions of new unlabeled samples to be used to replace the unlabeled hold-out predictions of x

...

other in case x is trainOcc, arguments that can be passed to holdOutPredictions

Value

a data frame that can be passed to the data argument of puSummary function.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
data(bananas)
model <- trainOcc(x=bananas$tr[, -1], y=bananas$tr[, 1], method="ocsvm")
hop <- holdOutPredictions(model) # returns aggregated
d <- dataForSummaryFunction(hop)
hop <- holdOutPredictions(model, partition = 1)
d <- dataForSummaryFunction(hop)

## End(Not run)

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