| checkrp {softclassval} | R Documentation |
Input checks and reference preparation for performance calculation
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
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
ref <- softclassval:::ref
ref
pred <- softclassval:::pred
pred
ref <- checkrp (r = ref, p = pred)
sens (r = ref, p = pred, .checked = TRUE)
[Package softclassval version 1.0-20160527 Index]