checkrp: Input checks and reference preparation for performance...

Description Usage Arguments Details Value Author(s) Examples

Description

Checks whether r and p are valid reference and predictions. If p is a multiple of r, recycles r to the size and shape of p. If r has additional length 1 dimensions (usually because dimensions were dropped from p), it is shortend to the shape of p.

Usage

1
checkrp(r, p)

Arguments

r

reference

p

prediction

Details

In addition, any NAs in p are transferred to r so that these samples are excluded from counting in nsamples.

checkrp is automatically called by the performance functions, but doing so beforehand and then setting .checked = TRUE can save time when several performance measures are to be calculated on the same results.

Value

r, possibly recycled to length of p or with dimensions shortened to p.

Author(s)

Claudia Beleites

Examples

1
2
3
4
5
6
7
8
ref <- softclassval:::ref
ref

pred <- softclassval:::pred
pred

ref <- checkrp (r = ref, p = pred)
sens (r = ref, p = pred, .checked = TRUE)

softclassval documentation built on May 2, 2019, 4:56 p.m.